mirror_ubuntu-kernels/drivers/media/platform
Suresh Udipi cee44d4fba media: rcar-csi2: Correct the selection of hsfreqrange
hsfreqrange should be chosen based on the calculated mbps which
is closer to the default bit rate  and within the range as per
table[1]. But current calculation always selects first value which
is greater than or equal to the calculated mbps which may lead
to chosing a wrong range in some cases.

For example for 360 mbps for H3/M3N
Existing logic selects
Calculated value 360Mbps : Default 400Mbps Range [368.125 -433.125 mbps]

This hsfreqrange is out of range.

The logic is changed to get the default value which is closest to the
calculated value [1]

Calculated value 360Mbps : Default 350Mbps  Range [320.625 -380.625 mpbs]

[1] specs r19uh0105ej0200-r-car-3rd-generation.pdf [Table 25.9]

Please note that According to Renesas in Table 25.9 the range for
220 default value is corrected as below

 |Range (Mbps)     |  Default  Bit rate (Mbps) |
 -----------------------------------------------
 | 197.125-244.125 |     220                   |
 -----------------------------------------------

Fixes: 769afd212b ("media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver")
Signed-off-by: Suresh Udipi <sudipi@jp.adit-jv.com>
Signed-off-by: Kazuyoshi Akiyama <akiyama@nds-osk.co.jp>
Signed-off-by: Michael Rodin <mrodin@de.adit-jv.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-30 11:55:20 +01:00
..
allegro-dvt media: allegro: write vui parameters for HEVC 2021-10-20 16:02:03 +01:00
am437x media: am437x: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:48 +02:00
atmel media: atmel: fix the ispck initialization 2021-09-30 10:08:00 +02:00
cadence media: cadence: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:48 +02:00
coda media: coda: V4L2_PIX_FMT_GREY for coda960 JPEG Encoder 2021-11-19 06:10:06 +00:00
davinci media: davinci: vpbe_osd: mark read reg function as __always_unused 2021-11-29 13:23:14 +01:00
exynos4-is media: exynos4-is: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:49 +02:00
exynos-gsc media: exynos-gsc: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:49 +02:00
imx-jpeg media: imx-jpeg: Add pm-runtime support for imx-jpeg 2021-10-19 08:08:39 +01:00
marvell-ccic media: marvell-ccic: drop to_cam() unused function 2021-11-29 10:15:04 +01:00
meson/ge2d media: meson: ge2d: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:50 +02:00
mtk-jpeg media: mtk-jpeg: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:50 +02:00
mtk-mdp media: mtk-mdp: address a clang warning 2021-11-29 13:23:25 +01:00
mtk-vcodec media: mtk-vcodec: remove unused func parameter 2021-11-19 06:03:24 +00:00
mtk-vpu media: mtk-vpu: Remove redundant 'flush_workqueue()' calls 2021-11-15 08:12:07 +00:00
omap media: omap_vout: use dma_addr_t consistently 2021-10-08 11:26:13 +02:00
omap3isp media: omap3isp: avoid warnings at IS_OUT_OF_BOUNDS() 2021-11-29 10:15:04 +01:00
qcom media: camss: Remove unused static function 2021-11-29 13:23:25 +01:00
rcar-vin media: rcar-csi2: Correct the selection of hsfreqrange 2021-11-30 11:55:20 +01:00
rockchip media: rockchip: rga: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:51 +02:00
s3c-camif media: s3c-camif: Remove unused including <linux/version.h> 2021-09-30 10:07:57 +02:00
s5p-g2d media: s5p-g2d: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:52 +02:00
s5p-jpeg media: s5p-jpeg: rename JPEG marker constants to prevent build warnings 2021-09-30 10:08:04 +02:00
s5p-mfc media: s5p-mfc: Use 'bitmap_zalloc()' when applicable 2021-11-15 08:12:02 +00:00
sti media: sti: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:52 +02:00
stm32 media: stm32-dma2d: fix compile errors when W=1 2021-11-15 08:12:05 +00:00
sunxi media: sun6i-csi: Allow the video device to be open multiple times 2021-09-30 10:07:59 +02:00
ti-vpe media: v4l: async: Rename async nf functions, clean up long lines 2021-09-30 10:07:35 +02:00
vsp1 media: vsp1: Add support for the V3U VSPD 2021-10-08 11:26:13 +02:00
xilinx media: xilinx: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:53 +02:00
aspeed-video.c media: aspeed: Update signal status immediately to ensure sane hw state 2021-11-15 08:12:05 +00:00
fsl-viu.c media: use getter/setter functions 2021-03-11 11:59:42 +01:00
imx-pxp.c media: imx-pxp: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:50 +02:00
imx-pxp.h media: imx-pxp: add i.MX Pixel Pipeline driver 2018-09-11 13:32:17 -04:00
Kconfig media: stm32-dma2d: fix compile-testing failed 2021-11-15 08:12:05 +00:00
m2m-deinterlace.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
Makefile media: stm32-dma2d: STM32 DMA2D driver 2021-11-15 08:11:33 +00:00
mx2_emmaprp.c media: mx2_emmaprp: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:50 +02:00
pxa_camera.c media: v4l: async: Rename async nf functions, clean up long lines 2021-09-30 10:07:35 +02:00
rcar_drif.c media: rcar_drif: Make use of the helper function devm_platform_get_and_ioremap_resource() 2021-09-30 10:07:53 +02:00
rcar_fdp1.c media: rcar_fdp1: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:51 +02:00
rcar_jpu.c media: rcar_jpu: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:51 +02:00
rcar-fcp.c media: rcar-fcp: use pm_runtime_resume_and_get() 2021-05-20 16:02:36 +02:00
rcar-isp.c media: rcar-isp: Add Renesas R-Car Image Signal Processor driver 2021-10-08 13:26:43 +02:00
renesas-ceu.c media: renesas-ceu: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:51 +02:00
sh_vou.c media: sh_vou: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
via-camera.c media: via-camera: deleted these redundant semicolons 2021-09-30 10:07:53 +02:00
via-camera.h
video-mux.c media: v4l: async: Rename async nf functions, clean up long lines 2021-09-30 10:07:35 +02:00