media: atomisp-ov2680: Fix ov2680_set_fmt() messing up high exposure settings
authorHans de Goede <hdegoede@redhat.com>
Sun, 7 Nov 2021 17:15:49 +0000 (17:15 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:57 +0000 (08:11 +0000)
commit29400b5063db69fbed9ff483a44d635b15d847cc
tree565f85d705e3e1e8f3b8d0464e7240fd892eb28c
parent4492289c31364d28c2680b43b18883385a5d216c
media: atomisp-ov2680: Fix ov2680_set_fmt() messing up high exposure settings

For exposure settings > (lines_per_frame - vts_margin) the VTS register
needs to be programmed to (exposure + vts_margin) rather then being
set to lines_per_frame.

The res->regs register array was clobbering this higher setting causing
high exposure settings to not work. Fix this by letting ov2680_set_fmt()
calculate the vts value, instead of hardcoding it.

This is the last in a series of fixes which fixes exposure and gain
settings not working, with this everything works, so drop the comment
that it does not work.

Link: https://lore.kernel.org/linux-media/20211107171549.267583-12-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
drivers/staging/media/atomisp/i2c/ov2680.h