769e592657d5c6b6d9a5656a67e5d57d52cd5db9
[openwrt/staging/linusw.git] /
1 From cd306429474a0265660759ab12024d8ff978d586 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
5 calculations
6
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.
10
11 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
12 ---
13 drivers/media/i2c/imx477.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
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
19
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,