media: atomisp-ov2680: Fix ov2680_set_fmt() clobbering the exposure
authorHans de Goede <hdegoede@redhat.com>
Sun, 7 Nov 2021 17:15:48 +0000 (17:15 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:56 +0000 (08:11 +0000)
Now that we restore the default or last user set exposure setting on
power_up() there is no need for the registers written by ov2680_set_fmt()
to write to the exposure register.

Not doing so fixes the exposure always being reset to the value from
the res->regs array after a set_fmt().

Link: https://lore.kernel.org/linux-media/20211107171549.267583-11-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/i2c/ov2680.h

index ca20ce5..d52b7fb 100644 (file)
@@ -288,8 +288,6 @@ static struct ov2680_reg const ov2680_global_setting[] = {
  */
 static struct ov2680_reg const ov2680_QCIF_30fps[] = {
        {0x3086, 0x01},
-       {0x3501, 0x24},
-       {0x3502, 0x40},
        {0x370a, 0x23},
        {0x3801, 0xa0},
        {0x3802, 0x00},
@@ -333,8 +331,6 @@ static struct ov2680_reg const ov2680_QCIF_30fps[] = {
  */
 static struct ov2680_reg const ov2680_CIF_30fps[] = {
        {0x3086, 0x01},
-       {0x3501, 0x24},
-       {0x3502, 0x40},
        {0x370a, 0x23},
        {0x3801, 0xa0},
        {0x3802, 0x00},
@@ -376,8 +372,6 @@ static struct ov2680_reg const ov2680_CIF_30fps[] = {
  */
 static struct ov2680_reg const ov2680_QVGA_30fps[] = {
        {0x3086, 0x01},
-       {0x3501, 0x24},
-       {0x3502, 0x40},
        {0x370a, 0x23},
        {0x3801, 0xa0},
        {0x3802, 0x00},
@@ -419,8 +413,6 @@ static struct ov2680_reg const ov2680_QVGA_30fps[] = {
  */
 static struct ov2680_reg const ov2680_656x496_30fps[] = {
        {0x3086, 0x01},
-       {0x3501, 0x24},
-       {0x3502, 0x40},
        {0x370a, 0x23},
        {0x3801, 0xa0},
        {0x3802, 0x00},
@@ -462,8 +454,6 @@ static struct ov2680_reg const ov2680_656x496_30fps[] = {
  */
 static struct ov2680_reg const ov2680_720x592_30fps[] = {
        {0x3086, 0x01},
-       {0x3501, 0x26},
-       {0x3502, 0x40},
        {0x370a, 0x23},
        {0x3801, 0x00}, // X_ADDR_START;
        {0x3802, 0x00},
@@ -507,8 +497,6 @@ static struct ov2680_reg const ov2680_720x592_30fps[] = {
  */
 static struct ov2680_reg const ov2680_800x600_30fps[] = {
        {0x3086, 0x01},
-       {0x3501, 0x26},
-       {0x3502, 0x40},
        {0x370a, 0x23},
        {0x3801, 0x00},
        {0x3802, 0x00},
@@ -550,8 +538,6 @@ static struct ov2680_reg const ov2680_800x600_30fps[] = {
  */
 static struct ov2680_reg const ov2680_720p_30fps[] = {
        {0x3086, 0x00},
-       {0x3501, 0x48},
-       {0x3502, 0xe0},
        {0x370a, 0x21},
        {0x3801, 0xa0},
        {0x3802, 0x00},
@@ -593,8 +579,6 @@ static struct ov2680_reg const ov2680_720p_30fps[] = {
  */
 static struct ov2680_reg const ov2680_1296x976_30fps[] = {
        {0x3086, 0x00},
-       {0x3501, 0x48},
-       {0x3502, 0xe0},
        {0x370a, 0x21},
        {0x3801, 0xa0},
        {0x3802, 0x00},
@@ -636,8 +620,6 @@ static struct ov2680_reg const ov2680_1296x976_30fps[] = {
  */
 static struct ov2680_reg const ov2680_1456x1096_30fps[] = {
        {0x3086, 0x00},
-       {0x3501, 0x48},
-       {0x3502, 0xe0},
        {0x370a, 0x21},
        {0x3801, 0x90},
        {0x3802, 0x00},
@@ -681,8 +663,6 @@ static struct ov2680_reg const ov2680_1456x1096_30fps[] = {
 
 static struct ov2680_reg const ov2680_1616x916_30fps[] = {
        {0x3086, 0x00},
-       {0x3501, 0x48},
-       {0x3502, 0xe0},
        {0x370a, 0x21},
        {0x3801, 0x00},
        {0x3802, 0x00},
@@ -725,8 +705,6 @@ static struct ov2680_reg const ov2680_1616x916_30fps[] = {
 #if 0
 static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
        {0x3086, 0x00},
-       {0x3501, 0x48},
-       {0x3502, 0xe0},
        {0x370a, 0x21},
        {0x3801, 0x00},
        {0x3802, 0x00},
@@ -768,8 +746,6 @@ static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
  */
 static struct ov2680_reg const ov2680_1616x1216_30fps[] = {
        {0x3086, 0x00},
-       {0x3501, 0x48},
-       {0x3502, 0xe0},
        {0x370a, 0x21},
        {0x3801, 0x00},
        {0x3802, 0x00},