mirror of
				https://github.com/Ysurac/openmptcprouter.git
				synced 2025-03-09 15:40:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			1,009 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			1,009 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
From 05bb9fcaebb02dcaf50ca7893ecf15c078ff17c6 Mon Sep 17 00:00:00 2001
 | 
						|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
 | 
						|
Date: Mon, 4 Jul 2022 18:12:56 +0100
 | 
						|
Subject: [PATCH] media: i2c: ov9281: Change exposure default value with mode
 | 
						|
 choice
 | 
						|
 | 
						|
When the exposure range is updated due to changing VBLANK, adopt
 | 
						|
the mode default value, not the current default.
 | 
						|
 | 
						|
Should the specific default value be outside of the min/max range
 | 
						|
defined, then the whole update is rejected, which can leave an
 | 
						|
invalid exposure range active.
 | 
						|
 | 
						|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 | 
						|
---
 | 
						|
 drivers/media/i2c/ov9281.c | 2 +-
 | 
						|
 1 file changed, 1 insertion(+), 1 deletion(-)
 | 
						|
 | 
						|
--- a/drivers/media/i2c/ov9281.c
 | 
						|
+++ b/drivers/media/i2c/ov9281.c
 | 
						|
@@ -976,7 +976,7 @@ static int ov9281_set_ctrl(struct v4l2_c
 | 
						|
 		__v4l2_ctrl_modify_range(ov9281->exposure,
 | 
						|
 					 ov9281->exposure->minimum, max,
 | 
						|
 					 ov9281->exposure->step,
 | 
						|
-					 ov9281->exposure->default_value);
 | 
						|
+					 ov9281->cur_mode->vts_def);
 | 
						|
 		break;
 | 
						|
 	}
 | 
						|
 
 |