aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0598-media-i2c-imx296-Set-a-1-frame-gain-delay.patch
blob: 2537d9f7745e9dd4a5d1b3c9b0bdfe0344ef166e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 9fc440641b43e04a07d04988bba830bb57f1231c Mon Sep 17 00:00:00 2001
From: Naushir Patuck <naush@raspberrypi.com>
Date: Tue, 14 Mar 2023 10:46:46 +0000
Subject: [PATCH] media: i2c: imx296: Set a 1 frame gain delay

Set the gain delay to 1 frame in the sensor. This avoids any race
condition or ambiguity over when the setting is applied through
userland.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 drivers/media/i2c/imx296.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/i2c/imx296.c
+++ b/drivers/media/i2c/imx296.c
@@ -584,7 +584,7 @@ static int imx296_setup(struct imx296 *s
 	imx296_write(sensor, IMX296_CTRL418C, sensor->clk_params->ctrl418c,
 		     &ret);
 
-	imx296_write(sensor, IMX296_GAINDLY, IMX296_GAINDLY_NONE, &ret);
+	imx296_write(sensor, IMX296_GAINDLY, IMX296_GAINDLY_1FRAME, &ret);
 	imx296_write(sensor, IMX296_BLKLEVEL, 0x03c, &ret);
 
 	return ret;