Using half the hts value when using 2 lanes results in hts < width, which results in reporting a negative hblank value to userspace. The hts value in the mode struct is only used for reporting the hblank control to userspace so this change does not result in any different register settings being written to the sensor. After this change the register-lists are still writing 1140 to the HTS register of the sensor in 2 lane mode, which seems to be a too low value for HTS. But maybe the value of this register is multiplied by 2 internally by the sensor when 2 lanes are used ? Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- drivers/media/i2c/ov02c10.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c index f18b48fe8c0d..a33f9d4033e6 100644 --- a/drivers/media/i2c/ov02c10.c +++ b/drivers/media/i2c/ov02c10.c @@ -26,6 +26,8 @@ #define OV02C10_REG_STREAM_CONTROL CCI_REG8(0x0100) +#define OV02C10_REG_HTS CCI_REG16(0x380c) + /* vertical-timings from sensor */ #define OV02C10_REG_VTS CCI_REG16(0x380e) #define OV02C10_VTS_MAX 0xffff @@ -372,7 +374,7 @@ static const struct ov02c10_mode supported_modes[] = { { .width = 1928, .height = 1092, - .hts = 1140, + .hts = 2280, .vts_def = 2328, .vts_min = 2328, .mipi_lanes = 2, -- 2.48.1