diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0731-media-i2c-ov7251-Do-not-reset-gain-on-mode-change.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0731-media-i2c-ov7251-Do-not-reset-gain-on-mode-change.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0731-media-i2c-ov7251-Do-not-reset-gain-on-mode-change.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0731-media-i2c-ov7251-Do-not-reset-gain-on-mode-change.patch b/target/linux/bcm27xx/patches-5.15/950-0731-media-i2c-ov7251-Do-not-reset-gain-on-mode-change.patch new file mode 100644 index 0000000000..fba048c722 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0731-media-i2c-ov7251-Do-not-reset-gain-on-mode-change.patch @@ -0,0 +1,58 @@ +From 46773bdd99e4ab1bd0d65931ef782122f4f4a031 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <dave.stevenson@raspberrypi.com> +Date: Sat, 12 Feb 2022 12:33:13 +0000 +Subject: [PATCH] media: i2c: ov7251: Do not reset gain on mode change + +There is no reaon why changing mode should reset the analogue +gain of the sensor, and it's not the behaviour that userspace +will be expecting. +Remove the reset. + +Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> +--- + drivers/media/i2c/ov7251.c | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +--- a/drivers/media/i2c/ov7251.c ++++ b/drivers/media/i2c/ov7251.c +@@ -115,7 +115,6 @@ struct ov7251 { + + struct v4l2_ctrl_handler ctrls; + struct v4l2_ctrl *exposure; +- struct v4l2_ctrl *gain; + struct v4l2_ctrl *hblank; + + /* Cached register values */ +@@ -1167,10 +1166,6 @@ static int ov7251_set_format(struct v4l2 + if (ret < 0) + goto exit; + +- ret = __v4l2_ctrl_s_ctrl(ov7251->gain, 16); +- if (ret < 0) +- goto exit; +- + ov7251->current_mode = new_mode; + } + +@@ -1321,10 +1316,6 @@ static int ov7251_set_frame_interval(str + if (ret < 0) + goto exit; + +- ret = __v4l2_ctrl_s_ctrl(ov7251->gain, 16); +- if (ret < 0) +- goto exit; +- + ov7251->current_mode = new_mode; + } + +@@ -1550,8 +1541,8 @@ static int ov7251_probe(struct i2c_clien + V4L2_CID_VFLIP, 0, 1, 1, 0); + ov7251->exposure = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops, + V4L2_CID_EXPOSURE, 1, 32, 1, 32); +- ov7251->gain = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops, +- V4L2_CID_GAIN, 16, 1023, 1, 16); ++ v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops, V4L2_CID_GAIN, ++ 16, 1023, 1, 16); + v4l2_ctrl_new_std_menu_items(&ov7251->ctrls, &ov7251_ctrl_ops, + V4L2_CID_TEST_PATTERN, + ARRAY_SIZE(ov7251_test_pattern_menu) - 1, |