60d1c1b1acb17b0bebc5ff48ed7247db6b011d1c
[openwrt/staging/blogic.git] /
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
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,