armbian_build/patch/kernel/archive/sunxi-5.10/megous/media-ov5640-Experiment-Try-to-disable-denoising-sha.patch
The-going 7964a578f5
Patches megous 5.10 (#3293)
* Add a series of patches for sunxi 5.10

Patches from the repository
https://github.com/megous/linux branches of orange-pi-5.10

* Patches adapted to the kernel version v5.10.81

* Remove unnecessary patches 5.10.19-5.10.75

* Kernel switch tag=v5.10.81 for the current sunxi

* Adjust broken patches, build tested on sunxi and sunxi64

* Remove patch added by mistake

Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
2021-11-27 00:48:30 +01:00

45 lines
1.1 KiB
Diff

From 221c3d8bdc5723b27e0fd51236596f6699dc1ed2 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Fri, 24 Jan 2020 18:25:59 +0100
Subject: [PATCH 052/323] media: ov5640: [Experiment] Try to disable
denoising/sharpening
Not sure how this works exactly. More tests are needed.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
drivers/media/i2c/ov5640.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index b3087ec9f..fbb7f483b 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -1818,6 +1818,23 @@ static int ov5640_set_mode(struct ov5640_dev *sensor)
if (ret < 0)
return ret;
+ u8 tmp;
+ ret = ov5640_read_reg(sensor, 0x5308, &tmp);
+ if (ret)
+ return ret;
+
+ ret = ov5640_write_reg(sensor, 0x5308, tmp | 0x10 | 0x40);
+ if (ret)
+ return ret;
+
+ ret = ov5640_write_reg(sensor, 0x5306, 0);
+ if (ret)
+ return ret;
+
+ ret = ov5640_write_reg(sensor, 0x5302, 0);
+ if (ret)
+ return ret;
+
sensor->pending_mode_change = false;
sensor->last_mode = mode;
--
2.34.0