WSL2-Linux-Kernel/drivers/media
Andrey Konovalov 612edd4888 media: qcom: camss: Fix csid-gen2 for test pattern generator
[ Upstream commit 87889f1b7ea40d2544b49c62092e6ef2792dced7 ]

In the current driver csid Test Pattern Generator (TPG) doesn't work.
This change:
- fixes writing frame width and height values into CSID_TPG_DT_n_CFG_0
- fixes the shift by one between test_pattern control value and the
  actual pattern.
- drops fixed VC of 0x0a which testing showed prohibited some test
  patterns in the CSID to produce output.
So that TPG starts working, but with the below limitations:
- only test_pattern=9 works as it should
- test_pattern=8 and test_pattern=7 produce black frame (all zeroes)
- the rest of test_pattern's don't work (yavta doesn't get the data)
- regardless of the CFA pattern set by 'media-ctl -V' the actual pixel
  order is always the same (RGGB for any RAW8 or RAW10P format in
  4608x2592 resolution).

Tested with:

RAW10P format, VC0:
 media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4608x2592 field:none]'
 media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4608x2592 field:none]'
 media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
 v4l2-ctl -d /dev/v4l-subdev6 -c test_pattern=9
 yavta -B capture-mplane --capture=3 -n 3 -f SRGGB10P -s 4608x2592 /dev/video0

RAW10P format, VC1:
 media-ctl -V '"msm_csid0":2[fmt:SRGGB10/4608x2592 field:none]'
 media-ctl -V '"msm_vfe0_rdi1":0[fmt:SRGGB10/4608x2592 field:none]'
 media-ctl -l '"msm_csid0":2->"msm_vfe0_rdi1":0[1]'
 v4l2-ctl -d /dev/v4l-subdev6 -c test_pattern=9
 yavta -B capture-mplane --capture=3 -n 3 -f SRGGB10P -s 4608x2592 /dev/video1

RAW8 format, VC0:
 media-ctl --reset
 media-ctl -V '"msm_csid0":0[fmt:SRGGB8/4608x2592 field:none]'
 media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB8/4608x2592 field:none]'
 media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
 yavta -B capture-mplane --capture=3 -n 3 -f SRGGB8 -s 4608x2592 /dev/video0

Fixes: eebe6d00e9 ("media: camss: Add support for CSID hardware version Titan 170")
Cc: stable@vger.kernel.org
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-03 07:31:23 +01:00
..
cec media: cec: meson: always include meson sub-directory in Makefile 2023-11-28 16:56:21 +00:00
common media: vb2: frame_vector.c: replace WARN_ONCE with a comment 2023-10-06 13:18:18 +02:00
dvb-core media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221 2023-06-09 10:32:24 +02:00
dvb-frontends media: dvb: symbol fixup for dvb_attach() 2023-09-19 12:22:51 +02:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:13:30 +01:00
i2c media: ccs: Correctly initialise try compose rectangle 2023-11-28 16:56:34 +00:00
mc media: mc-device.c: use DEVICE_ATTR_RO() helper macro 2021-08-04 14:43:50 +02:00
mmc
pci media: cobalt: Use FIELD_GET() to extract Link Width 2023-11-28 16:56:20 +00:00
platform media: qcom: camss: Fix csid-gen2 for test pattern generator 2023-12-03 07:31:23 +01:00
radio media: radio-shark: Add endpoint checks 2023-05-30 13:55:31 +01:00
rc media: sharp: fix sharp encoding 2023-11-28 16:56:34 +00:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 19:16:27 +01:00
test-drivers media: vivid: avoid integer overflow 2023-11-28 16:56:20 +00:00
tuners media: tuners: qt1010: replace BUG_ON with a regular error 2023-09-23 11:09:58 +02:00
usb media: gspca: cpia1: shift-out-of-bounds in set_flicker 2023-11-28 16:56:20 +00:00
v4l2-core media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link() 2023-09-19 12:22:43 +02:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2022-01-27 11:05:20 +01:00
Makefile