]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: rcar-csi2: Optimize the selection PHTW register
authorSuresh Udipi <sudipi@jp.adit-jv.com>
Fri, 13 Aug 2021 15:07:56 +0000 (17:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:04:31 +0000 (09:04 +0100)
commit2b1e782a94c1b0b76899b3ace180607c272ccdcd
tree5887fc5aef46fc5a541603384c5a69a85f3e300a
parent5e18204b0107eb5b36e1bb08f6cab332dada7739
media: rcar-csi2: Optimize the selection PHTW register

commit 549cc89cd09a85aaa16dc07ef3db811d5cf9bcb1 upstream.

PHTW register is selected based on default bit rate from Table[1].
for the bit rates less than or equal to 250. Currently first
value of default bit rate which is greater than or equal to
the caculated mbps is selected. This selection can be further
improved by selecting the default bit rate which is nearest to
the calculated value.

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

Fixes: 769afd212b16 ("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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/rcar-vin/rcar-csi2.c