bcm27xx: 6.1: add kernel patches
[openwrt/staging/nbd.git] / target / linux / bcm27xx / patches-6.1 / 950-0430-media-i2c-ov9281-Change-exposure-default-value-with-.patch
1 From ec8627b0eff55db1a8bdfe7bb327c31c6ca3dad7 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 4 Jul 2022 18:12:56 +0100
4 Subject: [PATCH] media: i2c: ov9281: Change exposure default value
5 with mode choice
6
7 When the exposure range is updated due to changing VBLANK, adopt
8 the mode default value, not the current default.
9
10 Should the specific default value be outside of the min/max range
11 defined, then the whole update is rejected, which can leave an
12 invalid exposure range active.
13
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 ---
16 drivers/media/i2c/ov9281.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 --- a/drivers/media/i2c/ov9281.c
20 +++ b/drivers/media/i2c/ov9281.c
21 @@ -976,7 +976,7 @@ static int ov9281_set_ctrl(struct v4l2_c
22 __v4l2_ctrl_modify_range(ov9281->exposure,
23 ov9281->exposure->minimum, max,
24 ov9281->exposure->step,
25 - ov9281->exposure->default_value);
26 + ov9281->cur_mode->vts_def);
27 break;
28 }
29