Patch "media: ov5640: fix low resolution image abnormal issue" has been added to the 6.4-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 low resolution image abnormal issue

to the 6.4-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-low-resolution-image-abnormal-issue.patch
and it can be found in the queue-6.4 subdirectory.

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



commit ca61574f8ea717de8a7c4cb48470294b7c0593d2
Author: Guoniu.zhou <guoniu.zhou@xxxxxxx>
Date:   Mon Jun 12 04:43:40 2023 +0200

    media: ov5640: fix low resolution image abnormal issue
    
    [ Upstream commit a828002f38c5ee49d3f0c0e64c0f0caa1aec8dc2 ]
    
    OV5640 will output abnormal image data when work at low resolution
    (320x240, 176x144 and 160x120) after switching from high resolution,
    such as 1080P, the time interval between high and low switching must
    be less than 1000ms in order to OV5640 don't enter suspend state during
    the time.
    
    The reason is by 0x3824 value don't restore to initialize value when
    do resolution switching. In high resolution setting array, 0x3824 is
    set to 0x04, but low resolution setting array remove 0x3824 in commit
    db15c1957a2d ("media: ov5640: Remove duplicated mode settings"). So
    when do resolution switching from high to low, such as 1080P to 320x240,
    and the time interval is less than auto suspend delay time which means
    global initialize setting array will not be loaded, the output image
    data are abnormal. Hence move 0x3824 from ov5640_init_setting[] table
    to ov5640_setting_low_res[] table and also move 0x4407 0x460b, 0x460c
    to avoid same issue.
    
    Fixes: db15c1957a2d ("media: ov5640: Remove duplicated mode settings")
    Signed-off-by: Guoniu.zhou <guoniu.zhou@xxxxxxx>
    Reviewed-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 1536649b9e90f..1bc4d72a906e5 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -568,9 +568,7 @@ static const struct reg_value ov5640_init_setting[] = {
 	{0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0}, {0x3000, 0x00, 0, 0},
 	{0x3002, 0x1c, 0, 0}, {0x3004, 0xff, 0, 0}, {0x3006, 0xc3, 0, 0},
 	{0x302e, 0x08, 0, 0}, {0x4300, 0x3f, 0, 0},
-	{0x501f, 0x00, 0, 0}, {0x4407, 0x04, 0, 0},
-	{0x440e, 0x00, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
-	{0x4837, 0x0a, 0, 0}, {0x3824, 0x02, 0, 0},
+	{0x501f, 0x00, 0, 0}, {0x440e, 0x00, 0, 0}, {0x4837, 0x0a, 0, 0},
 	{0x5000, 0xa7, 0, 0}, {0x5001, 0xa3, 0, 0}, {0x5180, 0xff, 0, 0},
 	{0x5181, 0xf2, 0, 0}, {0x5182, 0x00, 0, 0}, {0x5183, 0x14, 0, 0},
 	{0x5184, 0x25, 0, 0}, {0x5185, 0x24, 0, 0}, {0x5186, 0x09, 0, 0},
@@ -634,7 +632,8 @@ static const struct reg_value ov5640_setting_low_res[] = {
 	{0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
 	{0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
 	{0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
-	{0x4407, 0x04, 0, 0}, {0x5001, 0xa3, 0, 0},
+	{0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
+	{0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0},
 };
 
 static const struct reg_value ov5640_setting_720P_1280_720[] = {



[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