linux/drivers/media/platform
Jacopo Mondi d3a67f2747 media: renesas-ceu: Set mbus_fmt on subdev operations
The renesas-ceu driver intializes the desired mbus_format at 'complete'
time, inspecting the supported subdevice ones, and tuning some
parameters to produce the requested memory format from what the sensor
can produce. Although, the initially selected mbus_format was not
provided to the subdevice during set_fmt and try_fmt operations,
providing instead a '0' mbus format code.

As long as the sensor defaults to a compatible mbus_format when an
invalid code as '0' is provided, capture operations work correctly. If
the subdevice defaults to an unsupported format (eg. some RGB
permutations) capture does not work properly due to a mismatch on the
expected and received image format on the wire.

Fix that by re-using the initially selected mbus_format code during
set_fmt and try_fmt subdevice operation calls.

Tested by printing out the format selection procedure with ov7670
sensor.

Before this patch:
[    0.866001] ov7670_try_fmt_internal -- Looking for mbus_code 0x0000
[    0.870882] ov7670_try_fmt_internal -- Try mbus_code 0x2008
[    0.876336] ov7670_try_fmt_internal -- Try mbus_code 0x1002
[    0.881387] ov7670_try_fmt_internal -- Try mbus_code 0x1008
[    0.886537] ov7670_try_fmt_internal -- Try mbus_code 0x3001
[    0.891584] ov7670_try_fmt_internal -- mbus_code defaulted to 0x2008

With this patch applied:
[    0.867015] ov7670_try_fmt_internal -- Looking for mbus_code 0x2008
[    0.873205] ov7670_try_fmt_internal -- Try mbus_code 0x2008: match

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-09 16:27:25 -04:00
..
am437x media: platform: am437x: simplify getting .drvdata 2018-05-09 16:10:48 -04:00
atmel media: atmel-isc: Make local symbol fmt_configs_list static 2018-02-26 06:56:17 -05:00
cec-gpio media: cec-gpio: use GPIOD_OUT_HIGH_OPEN_DRAIN 2018-05-09 16:15:06 -04:00
coda media: coda: set colorimetry on coded queue 2018-05-09 16:23:33 -04:00
davinci media: vpbe_venc: potential uninitialized variable in ven_sub_dev_init() 2018-05-09 16:15:59 -04:00
exynos4-is media: include/media: fix missing | operator when setting cfg 2018-05-05 09:01:22 -04:00
exynos-gsc media updates for v4.16-rc1 2018-02-06 11:27:48 -08:00
marvell-ccic media: mmp-driver: add needed __iomem marks to power_regs 2018-04-17 05:29:14 -04:00
meson
mtk-jpeg media: vcodec: fix ptr_ret.cocci warnings 2018-05-09 15:58:30 -04:00
mtk-mdp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mtk-vcodec media: mtk-vcodec: Always signal source change event on format change 2018-02-26 07:41:36 -05:00
mtk-vpu media: mtk-vpu: add description for wdt fields at struct mtk_vpu 2017-11-30 04:19:00 -05:00
omap media: omap2: allow building it with COMPILE_TEST && DRM_OMAP 2018-05-04 09:55:38 -04:00
omap3isp media: omap3isp: make omap3isp_prev_csc and omap3isp_prev_rgbtorgb const 2018-04-23 13:53:35 -04:00
qcom remoteproc updates for v4.17 2018-04-10 12:09:27 -07:00
rcar-vin media: rcar-vin: enable field toggle after a set number of lines for Gen3 2018-05-05 10:28:17 -04:00
rockchip/rga media: rca: declare formats var as static 2018-03-23 06:28:41 -04:00
s3c-camif media: s3c-camif: fix out-of-bounds array access 2018-03-06 07:29:04 -05:00
s5p-cec media: s5p-cec: add NACK detection support 2017-09-23 07:29:30 -04:00
s5p-g2d media: platform: make video_device const 2017-08-27 08:44:30 -04:00
s5p-jpeg media: s5p-jpeg: don't return a value on a void function 2018-05-04 08:58:22 -04:00
s5p-mfc media: s5p_mfc_enc: get rid of new warnings 2018-03-22 07:23:48 -04:00
soc_camera soc_camera: fix a weird cast on printk 2018-03-23 06:55:50 -04:00
sti media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
stm32 media: stm32-dcmi: add JPEG support 2018-03-21 11:53:09 -04:00
tegra-cec media: tegra-cec: reset rx_buf_cnt when start bit detected 2018-03-05 07:46:24 -05:00
ti-vpe media: v4l2-async: simplify v4l2_async_subdev structure 2017-12-29 07:14:28 -05:00
vimc media: vimc: use correct subdev functions 2018-02-26 09:31:41 -05:00
vivid media: v4l: Bring back array_size parameter to v4l2_find_nearest_size 2018-04-04 06:12:53 -04:00
vsp1 media: v4l: vsp1: Rename BRU to BRx 2018-05-04 08:06:29 -04:00
xilinx media: v4l2-async: simplify v4l2_async_subdev structure 2017-12-29 07:14:28 -05:00
fsl-viu.c media: platform: fix some 64-bits warnings 2018-04-17 05:50:00 -04:00
Kconfig media: drivers: media: platform: make VIDEO_VIU depend on I2C 2018-05-05 09:56:43 -04:00
m2m-deinterlace.c media updates for v4.16-rc1 2018-02-06 11:27:48 -08:00
Makefile media updates for v4.17-rc1 2018-04-03 17:16:59 -07:00
mx2_emmaprp.c media: annotate ->poll() instances 2017-11-27 16:20:06 -05:00
pxa_camera.c media: v4l2-async: simplify v4l2_async_subdev structure 2017-12-29 07:14:28 -05:00
rcar_drif.c media: rcar_drif: fix error return code in rcar_drif_alloc_dmachannels() 2018-02-26 07:43:29 -05:00
rcar_fdp1.c media: drivers: remove "/**" from non-kernel-doc comments 2017-11-30 04:19:03 -05:00
rcar_jpu.c media: rcar_jpu: fix two kernel-doc markups 2017-11-30 04:19:03 -05:00
rcar-fcp.c
renesas-ceu.c media: renesas-ceu: Set mbus_fmt on subdev operations 2018-05-09 16:27:25 -04:00
sh_veu.c media: platform: sh_veu: use 64-bit arithmetic instead of 32-bit 2018-02-26 08:09:48 -05:00
sh_vou.c media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
via-camera.c media: platform: Use gpio_is_valid() 2018-05-09 16:17:15 -04:00
via-camera.h media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
video-mux.c media: platform: video-mux: propagate format from sink to source 2018-05-04 15:56:15 -04:00
vim2m.c media: drivers: remove "/**" from non-kernel-doc comments 2017-11-30 04:19:03 -05:00