media: ov01a10: Fix test pattern assignment
Sakari Ailus
maintainerPATCH 1/1 media: ov01a10: Fix test pattern assignment
The test patterns of the test pattern menu control start from 1 whereas register values start from 0. Fix this.
---
This goes on top of my recent ov01a10 series.
drivers/media/i2c/ov01a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov01a10.c +1 -1
@@ -319,7 +319,7 @@ static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain)static int ov01a10_test_pattern (struct ov01a10 *ov01a10,u32 pattern) {if (pattern) - pattern |=OV01A10_TEST_PATTERN_ENABLE ; + pattern = (pattern -1 ) |OV01A10_TEST_PATTERN_ENABLE ;return cci_write (ov01a10->regmap,OV01A10_REG_TEST_PATTERN , pattern,NULL );
Signature · 1 line
2.47.3
Hans de Goede
NAKHi,
Quoted 15 lines · Sakari Ailus
The test patterns of the test pattern menu control start from 1 whereas register values start from 0. Fix this.
Signed-off-by Sakari Ailus <[email protected]>---
This goes on top of my recent ov01a10 series.drivers/media/i2c/ov01a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/ov01a10.c +0
-0
drivers/media/i2c/ov01a10.c static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain) · line 322
Quoted 5 lines
drivers/media/i2c/ov01a10.c +1
-1@@ -319,7 +319,7 @@ static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain)static int ov01a10_test_pattern (struct ov01a10 *ov01a10,u32 pattern) {if (pattern) - pattern |=OV01A10_TEST_PATTERN_ENABLE ; + pattern = (pattern -1 ) |OV01A10_TEST_PATTERN_ENABLE ;
Nack, copy paste of my reply to Bingbu's email where this change was requested:
This was "pattern - 1" in the original v1 patch-set, the - 1 is dropped deliberately c2 because testing has shown that there is no difference between writing "0 | OV01A10_TEST_PATTERN_ENABLE" vs
"1 | OV01A10_TEST_PATTERN_ENABLE" to the register.
See the discussion here:
https://lore.kernel.org/linux-media/jgzovuqvd5csxwzmzf5asri7xvftoyb4lqyywtfdsrsgdvwz7i@neqszepmzw3m/
Please drop this patch.
Regards,
Hans
Sakari Ailus
maintainerQuoted 31 lines · Hans de Goede
Hi,
Quoted 15 lines · Sakari Ailus
The test patterns of the test pattern menu control start from 1 whereas register values start from 0. Fix this.
Signed-off-by Sakari Ailus <[email protected]>---
This goes on top of my recent ov01a10 series.drivers/media/i2c/ov01a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/ov01a10.c +0
-0drivers/media/i2c/ov01a10.c static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain) · line 322
Quoted 5 lines
drivers/media/i2c/ov01a10.c +1
-1@@ -319,7 +319,7 @@ static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain)static int ov01a10_test_pattern (struct ov01a10 *ov01a10,u32 pattern) {if (pattern) - pattern |=OV01A10_TEST_PATTERN_ENABLE ; + pattern = (pattern -1 ) |OV01A10_TEST_PATTERN_ENABLE ;Nack, copy paste of my reply to Bingbu's email where this change was requested:
This was "pattern - 1" in the original v1 patch-set, the - 1 is dropped deliberately c2 because testing has shown that there is no difference between writing "0 |
OV01A10_TEST_PATTERN_ENABLE" vs
"1 |OV01A10_TEST_PATTERN_ENABLE" to the register.
Quoted 5 lines
See the discussion here:
https://lore.kernel.org/linux-media/jgzovuqvd5csxwzmzf5asri7xvftoyb4lqyywtfdsrsgdvwz7i@neqszepmzw3m/
Please drop this patch.
Ack; done.
Signature · 1 line
Sakari Ailus
Hans,
Quoted 26 lines · Hans de Goede
Hi,
Quoted 15 lines · Sakari Ailus
The test patterns of the test pattern menu control start from 1 whereas register values start from 0. Fix this.
Signed-off-by Sakari Ailus <[email protected]>---
This goes on top of my recent ov01a10 series.drivers/media/i2c/ov01a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/ov01a10.c +0
-0drivers/media/i2c/ov01a10.c static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain) · line 322
Quoted 5 lines
drivers/media/i2c/ov01a10.c +1
-1@@ -319,7 +319,7 @@ static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain)static int ov01a10_test_pattern (struct ov01a10 *ov01a10,u32 pattern) {if (pattern) - pattern |=OV01A10_TEST_PATTERN_ENABLE ; + pattern = (pattern -1 ) |OV01A10_TEST_PATTERN_ENABLE ;Nack, copy paste of my reply to Bingbu's email where this change was requested:
Quoted 4 lines
This was "pattern - 1" in the original v1 patch-set, the - 1 is dropped deliberately c2 because testing has shown that there is no difference between writing "0 |
OV01A10_TEST_PATTERN_ENABLE" vs
"1 |OV01A10_TEST_PATTERN_ENABLE" to the register.
Hans,
Thanks for the explanation.
From the specification, color bar type1 is not same type2, type1 is a standard color bar, type2 is a top-bottom darker color bar, type3 is right-left darker one.
Mehdi, did you confirm the description in specification is wrong?
Quoted 15 lines
See the discussion here:
https://lore.kernel.org/linux-media/jgzovuqvd5csxwzmzf5asri7xvftoyb4lqyywtfdsrsgdvwz7i@neqszepmzw3m/
Please drop this patch.
Regards,
Hans
Signature · 2 lines
Best regards, Bingbu Cao
Hi Bingbu,
Quoted 36 lines · Bingbu Cao
Hans,
Quoted 26 lines · Hans de Goede
Hi,
Quoted 15 lines · Sakari Ailus
The test patterns of the test pattern menu control start from 1 whereas register values start from 0. Fix this.
Signed-off-by Sakari Ailus <[email protected]>---
This goes on top of my recent ov01a10 series.drivers/media/i2c/ov01a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/ov01a10.c +0
-0drivers/media/i2c/ov01a10.c static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain) · line 322
Quoted 5 lines
drivers/media/i2c/ov01a10.c +1
-1@@ -319,7 +319,7 @@ static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain)static int ov01a10_test_pattern (struct ov01a10 *ov01a10,u32 pattern) {if (pattern) - pattern |=OV01A10_TEST_PATTERN_ENABLE ; + pattern = (pattern -1 ) |OV01A10_TEST_PATTERN_ENABLE ;Nack, copy paste of my reply to Bingbu's email where this change was requested:
Quoted 4 lines
This was "pattern - 1" in the original v1 patch-set, the - 1 is dropped deliberately c2 because testing has shown that there is no difference between writing "0 |
OV01A10_TEST_PATTERN_ENABLE" vs
"1 |OV01A10_TEST_PATTERN_ENABLE" to the register.Hans,
Quoted 7 lines
Thanks for the explanation.
From the specification, color bar type1 is not same type2, type1 is a standard color bar, type2 is a top-bottom darker color bar, type3 is right-left darker one.
Mehdi, did you confirm the description in specification is wrong?
Yes Mehdi did confirm this, see:
https://lore.kernel.org/linux-media/jgzovuqvd5csxwzmzf5asri7xvftoyb4lqyywtfdsrsgdvwz7i@neqszepmzw3m/
Here is a table of register values ( + OV01A10_TEST_PATTERN_ENABLE) + test-pattern seen in testing:
0: Standard Color Bar
1: Standard Color Bar
2: Left-Right Darker Color Bar 3: Bottom-Top Darker Color Bar
Regards,
Hans
Hi Hans, Bingbu and Sakari,
Quoted 51 lines · Hans de Goede
Hi Bingbu,
Quoted 36 lines · Bingbu Cao
Hans,
Quoted 26 lines · Hans de Goede
Hi,
Quoted 15 lines · Sakari Ailus
The test patterns of the test pattern menu control start from 1 whereas register values start from 0. Fix this.
Signed-off-by Sakari Ailus <[email protected]>---
This goes on top of my recent ov01a10 series.drivers/media/i2c/ov01a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/ov01a10.c +0
-0drivers/media/i2c/ov01a10.c static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain) · line 322
Quoted 5 lines
drivers/media/i2c/ov01a10.c +1
-1@@ -319,7 +319,7 @@ static int ov01a10_update_digital_gain(struct ov01a10 *ov01a10, u32 d_gain)static int ov01a10_test_pattern (struct ov01a10 *ov01a10,u32 pattern) {if (pattern) - pattern |=OV01A10_TEST_PATTERN_ENABLE ; + pattern = (pattern -1 ) |OV01A10_TEST_PATTERN_ENABLE ;Nack, copy paste of my reply to Bingbu's email where this change was requested:
Quoted 4 lines
This was "pattern - 1" in the original v1 patch-set, the - 1 is dropped deliberately c2 because testing has shown that there is no difference between writing "0 |
OV01A10_TEST_PATTERN_ENABLE" vs
"1 |OV01A10_TEST_PATTERN_ENABLE" to the register.Hans,
Quoted 7 lines
Thanks for the explanation.
From the specification, color bar type1 is not same type2, type1 is a standard color bar, type2 is a top-bottom darker color bar, type3 is right-left darker one.
Mehdi, did you confirm the description in specification is wrong?
Yes Mehdi did confirm this, see:
https://lore.kernel.org/linux-media/jgzovuqvd5csxwzmzf5asri7xvftoyb4lqyywtfdsrsgdvwz7i@neqszepmzw3m/
Quoted 7 lines
Here is a table of register values ( +
OV01A10_TEST_PATTERN_ENABLE) + test-pattern seen in testing:0: Standard Color Bar
1: Standard Color Bar
2: Left-Right Darker Color Bar 3: Bottom-Top Darker Color Bar
Yes I confirm this when testing/reviewing the series from Hans.
--
Kind Regards
Mehdi Djait