]> git.itanic.dy.fi Git - linux-stable/commit
media: ov2740: Add support for 180 MHz link frequency
authorHans de Goede <hdegoede@redhat.com>
Mon, 4 Dec 2023 12:39:44 +0000 (13:39 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 13 Dec 2023 12:21:20 +0000 (13:21 +0100)
commit0677a2d9b735c1d57410dd188eb93ce61635987c
tree4eb159d2f86250c75cf153fa0a31501e3b9a17b5
parent4024107e104c06ac497b87bfd063c377b0b74527
media: ov2740: Add support for 180 MHz link frequency

On various Lenovo Thinkpad models with an ov2740 sensor the 360 MHz
link frequency is not supported.

Add support for 180 MHz link frequency, even though this has half the
pixel clock, this supports the same framerate by using half the VTS value
(significantly reducing the amount of empty lines send during vblank).

Normally if there are multiple link-frequencies then the sensor driver
choses the lowest link-frequency still usable for the chosen resolution.

In this case the board supports only 1 link-frequency. Which frequency
is supported is checked in ov2740_check_hwcfg() and then a different
set of supported_modes (using only the supported link-freq) is selected.

The register settings for this were taken from the ov2740 sensor driver
in the out of tree IPU6 driver:

https://github.com/intel/ipu6-drivers/

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/ov2740.c