mirror-linux/drivers/media/platform
Andrey Konovalov 87889f1b7e media: qcom: camss: Fix csid-gen2 for test pattern generator
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>
2023-09-27 09:39:54 +02:00
..
allegro-dvt media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
amlogic media: ge2d: Convert to platform remove callback returning void 2023-04-11 16:59:14 +02:00
amphion media: amphion: ensure the bitops don't cross boundaries 2023-07-25 09:31:49 +02:00
aspeed media: aspeed: Fix memory overwrite if timing is 1600x900 2023-07-19 12:57:51 +02:00
atmel media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
cadence media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
chips-media media: coda: Remove duplicated include 2023-08-14 20:27:58 +02:00
intel media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
marvell media: v4l: Use correct dependency for camera sensor drivers 2023-09-14 12:38:17 +02:00
mediatek media updates for v6.6-rc1 2023-09-01 12:21:32 -07:00
microchip media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
nvidia media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
nxp media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call 2023-09-19 09:03:21 +02:00
qcom media: qcom: camss: Fix csid-gen2 for test pattern generator 2023-09-27 09:39:54 +02:00
renesas media: rcar-csi2: Add support for C-PHY on R-Car V4H 2023-08-10 07:58:39 +02:00
rockchip media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
samsung media: camif-core: Do not check for 0 return after calling platform_get_irq() 2023-08-14 20:27:55 +02:00
st media: stm32: dcmi: only call s_stream on the source subdev 2023-08-10 07:58:36 +02:00
sunxi media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
ti media: platform: ti: fix the return value handle for platform_get_irq() 2023-08-14 20:27:55 +02:00
verisilicon media: verisilicon: Do not check for 0 return after calling platform_get_irq() 2023-08-14 20:27:55 +02:00
via media: via: Use correct dependency for camera sensor drivers 2023-09-14 12:38:17 +02:00
xilinx media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
Kconfig media: atmel: move microchip_csi2dc to dedicated microchip platform 2022-11-25 07:43:17 +00:00
Makefile media: atmel: move microchip_csi2dc to dedicated microchip platform 2022-11-25 07:43:17 +00:00
m2m-deinterlace.c media: m2m-deinterlace: Convert to platform remove callback returning void 2023-04-11 16:59:15 +02:00
video-mux.c media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00