linux/drivers/media/platform
Andrey Konovalov 78c2cc28df media: camss: use v4l2_get_link_freq() to calculate the relevant clocks
There are places in the camss driver where camss_get_pixel_clock() is
called to get the pixel rate (using V4L2_CID_PIXEL_RATE control) and to
calculate the link frequency from it. There is a case when this would
not work: when V4L2_CID_PIXEL_RATE gets the rate at which the pixels are
read (sampled) from the sensor's pixel array, and this rate is different
from the pixel transmission rate over the CSI link, the link frequency
value can't be calculated from the pixel rate. One needs to use
V4L2_CID_LINK_FREQ to get the link frequency in this case.

Replace such calls to camss_get_pixel_clock() with calls to a wrapper
around v4l2_get_link_freq(). v4l2_get_link_freq() tries V4L2_CID_LINK_FREQ
first, and if it is not implemented by the camera sensor driver, falls
back to V4L2_CID_PIXEL_RATE to calculate the link frequency value from.

Calls to camss_get_pixel_clock() from vfe_[check,set]_clock_rates()
are left intact as it looks like this VFE clock does depend on the
rate the pixel samples comes out of the camera sensor, not on the
frequency at which the link between the sensor and the CSI receiver
operates.

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Acked-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-11 11:59:43 +01:00
..
allegro-dvt media: allegro: add support for HEVC encoding 2021-01-27 16:15:04 +01:00
am437x media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
atmel media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
cadence media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
coda media: coda: Convert the driver to DT-only 2020-12-03 07:37:59 +01:00
davinci media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
exynos4-is media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
exynos-gsc media: Add V4L2_TYPE_IS_CAPTURE helper 2020-07-19 08:13:24 +02:00
marvell-ccic media: marvell-ccic: power up the device on mclk enable 2021-02-06 09:31:03 +01:00
meson/ge2d media: meson/ge2d: set ret to -ENOMEM 2021-01-27 08:32:16 +01:00
mtk-jpeg media: platform: add missing put_device() call in mtk_jpeg_probe() and mtk_jpeg_remove() 2020-11-16 10:31:16 +01:00
mtk-mdp media: mtk-mdp: Do not zero reserved fields 2021-01-27 13:18:29 +01:00
mtk-vcodec media: mtk-vcodec: fix argument used when DEBUG is defined 2021-01-27 13:45:24 +01:00
mtk-vpu media: mtk-vpu: dump VPU status when IPI times out 2020-12-03 07:42:34 +01:00
omap media: videobuf2: Move frame_vector into media subsystem 2021-01-12 14:15:31 +01:00
omap3isp media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
qcom media: camss: use v4l2_get_link_freq() to calculate the relevant clocks 2021-03-11 11:59:43 +01:00
rcar-vin media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
rockchip media updates for v5.12-rc1 2021-02-21 14:10:36 -08:00
s3c-camif media: s3c-camif: use semicolons rather than commas to separate statements 2020-11-16 10:31:06 +01:00
s5p-g2d media: s5p-g2d: Fix a memory leak in an error handling path in 'g2d_probe()' 2020-07-19 08:14:00 +02:00
s5p-jpeg media: s5p-jpeg: handle error condition in s5p_jpeg_probe 2020-12-03 07:45:49 +01:00
s5p-mfc media: Rename stateful codec control macros 2020-12-03 12:27:32 +01:00
sti media: platform: sti: make a const arrays static, makes object smaller 2021-03-11 11:59:42 +01:00
stm32 media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
sunxi media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
ti-vpe media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
vsp1 media: vsp1: Use BIT macro for feature identification 2021-01-12 18:17:43 +01:00
xilinx media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
aspeed-video.c media: aspeed: fix error return code in aspeed_video_setup_video() 2021-01-12 18:23:51 +01:00
fsl-viu.c media: use getter/setter functions 2021-03-11 11:59:42 +01:00
imx-pxp.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
imx-pxp.h
Kconfig media: platform: Remove depends on interconnect 2021-01-27 16:20:02 +01:00
m2m-deinterlace.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
Makefile media: allegro: move driver out of staging 2021-01-04 13:19:40 +01:00
mx2_emmaprp.c media: mx2_emmaprp: Fix memleak in emmaprp_probe 2020-09-26 10:15:39 +02:00
pxa_camera.c media: use getter/setter functions 2021-03-11 11:59:42 +01:00
rcar_drif.c media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
rcar_fdp1.c media: fdp1: Do not zero reserved fields 2021-01-27 13:18:45 +01:00
rcar_jpu.c media: jpu: Do not zero reserved fields 2021-01-27 13:19:03 +01:00
rcar-fcp.c media: platform: fcp: Fix a reference count leak. 2020-09-27 10:52:52 +02:00
renesas-ceu.c Devicetree updates for v5.12: 2021-02-22 10:05:12 -08:00
sh_vou.c media: sh_vou: Drop bogus __refdata annotation 2021-01-12 18:16:09 +01:00
via-camera.c Power management updates for 5.7-rc1 2020-03-30 15:05:01 -07:00
via-camera.h
video-mux.c media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00