• Hans de Goede's avatar
    media: ov2740: Add support for 180 MHz link frequency · 0677a2d9
    Hans de Goede authored
    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: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    0677a2d9
ov2740.c 32.9 KB