Patch "media: ov5640: fix auto controls values when switching to manual mode" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: ov5640: fix auto controls values when switching to manual mode

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-ov5640-fix-auto-controls-values-when-switching.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b1bf56b19765bd2ca7e629b9d287c24e0a027938
Author: Hugues Fruchet <hugues.fruchet@xxxxxx>
Date:   Tue Sep 11 09:48:20 2018 -0400

    media: ov5640: fix auto controls values when switching to manual mode
    
    [ Upstream commit a8f438c684eaa4cbe6c98828eb996d5ec53e24fb ]
    
    When switching from auto to manual mode, V4L2 core is calling
    g_volatile_ctrl() in manual mode in order to get the manual initial value.
    Remove the manual mode check/return to not break this behaviour.
    
    Signed-off-by: Hugues Fruchet <hugues.fruchet@xxxxxx>
    Tested-by: Jacopo Mondi <jacopo@xxxxxxxxxx>
    Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxxxx>

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 0366c8dc6ecf7..acf5c8a55bbd2 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -1900,16 +1900,12 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 
 	switch (ctrl->id) {
 	case V4L2_CID_AUTOGAIN:
-		if (!ctrl->val)
-			return 0;
 		val = ov5640_get_gain(sensor);
 		if (val < 0)
 			return val;
 		sensor->ctrls.gain->val = val;
 		break;
 	case V4L2_CID_EXPOSURE_AUTO:
-		if (ctrl->val == V4L2_EXPOSURE_MANUAL)
-			return 0;
 		val = ov5640_get_exposure(sensor);
 		if (val < 0)
 			return val;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux