1 From 28d69f0b8b5b66551071919c652355d266e8a841 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Fri, 11 Jun 2021 12:47:07 +0100
4 Subject: [PATCH] media: i2c: imx477: Fix for long exposure limit
7 Do not scale IMX477_EXPOSURE_OFFSET with the long exposure factor during
8 the limit calculations. This allows larger exposure times, and does seem to be
9 what the sensor is doing internally.
11 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
13 drivers/media/i2c/imx477.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
16 --- a/drivers/media/i2c/imx477.c
17 +++ b/drivers/media/i2c/imx477.c
18 @@ -1282,7 +1282,7 @@ static void imx477_adjust_exposure_range
20 /* Honour the VBLANK limits when setting exposure. */
21 exposure_max = imx477->mode->height + imx477->vblank->val -
22 - (IMX477_EXPOSURE_OFFSET << imx477->long_exp_shift);
23 + IMX477_EXPOSURE_OFFSET;
24 exposure_def = min(exposure_max, imx477->exposure->val);
25 __v4l2_ctrl_modify_range(imx477->exposure, imx477->exposure->minimum,
26 exposure_max, imx477->exposure->step,