Skip to contentSkip to conversation

media: i2c: Fix pixel array positions in ov8865

PATCH In review Daniel Scally 3 participants 3 messages Mar 2, 2022 – Mar 3, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 media: i2c: Fix pixel array positions in ov8865

The ov8865's datasheet gives the pixel array as 3296x2528, and the active portion as the centre 3264x2448. This makes for a top offset of 40 and a left offset of 16, not 32 and 80.

Fixes acd25e220921 ("media: i2c: Add .get_selection() support to ov8865")

---
Changes in v2:

- Swapped the ordering of the lines so the left offset is first (Paul)

 drivers/media/i2c/ov8865.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/ov8865.c +2 -2
index cfc726e0ed1e..b8f4f0d3e33d 100644
@@ -457,8 +457,8 @@
 
 #define OV8865_NATIVE_WIDTH			3296
 #define OV8865_NATIVE_HEIGHT			2528
-#define OV8865_ACTIVE_START_TOP			32
-#define OV8865_ACTIVE_START_LEFT		80
+#define OV8865_ACTIVE_START_LEFT		16
+#define OV8865_ACTIVE_START_TOP			40
 #define OV8865_ACTIVE_WIDTH			3264
 #define OV8865_ACTIVE_HEIGHT			2448
 
Signature · 1 line
2.25.1
Reviewed-by on v2 1/1
#1 lore raw

Quoting Daniel Scally (2022-03-02 22:24:48)

Quoted 3 lines

The ov8865's datasheet gives the pixel array as 3296x2528, and the active portion as the centre 3264x2448. This makes for a top offset of 40 and a left offset of 16, not 32 and 80.

Figure 3.1 shows 24 black lines, and 16 dummy lines at the top and bottom, giving 40 indeed.

And with 16 dummy pixel columns to both the left and right, this all checks out.

Quoted 30 lines
Fixes acd25e220921 ("media: i2c: Add .get_selection() support to ov8865")

---
Changes in v2:

- Swapped the ordering of the lines so the left offset is first (Paul)

 drivers/media/i2c/ov8865.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/ov8865.c +2 -2
index cfc726e0ed1e..b8f4f0d3e33d 100644
@@ -457,8 +457,8 @@
 
 #define OV8865_NATIVE_WIDTH                    3296
 #define OV8865_NATIVE_HEIGHT                   2528
-#define OV8865_ACTIVE_START_TOP                        32
-#define OV8865_ACTIVE_START_LEFT               80
+#define OV8865_ACTIVE_START_LEFT               16
+#define OV8865_ACTIVE_START_TOP                        40
 #define OV8865_ACTIVE_WIDTH                    3264
 #define OV8865_ACTIVE_HEIGHT                   2448
 
Signature · 1 line
2.25.1
Reviewed-by on v2 1/1
#2 lore raw
In reply to Daniel Scally

Hi Daniel,

Quoted 3 lines · Daniel Scally

The ov8865's datasheet gives the pixel array as 3296x2528, and the active portion as the centre 3264x2448. This makes for a top offset of 40 and a left offset of 16, not 32 and 80.

Thanks for this new version!

Cheers,

Paul

Quoted 30 lines
Fixes acd25e220921 ("media: i2c: Add .get_selection() support to ov8865")

---
Changes in v2:

- Swapped the ordering of the lines so the left offset is first (Paul)

 drivers/media/i2c/ov8865.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/ov8865.c +2 -2
index cfc726e0ed1e..b8f4f0d3e33d 100644
@@ -457,8 +457,8 @@
 
 #define OV8865_NATIVE_WIDTH			3296
 #define OV8865_NATIVE_HEIGHT			2528
-#define OV8865_ACTIVE_START_TOP			32
-#define OV8865_ACTIVE_START_LEFT		80
+#define OV8865_ACTIVE_START_LEFT		16
+#define OV8865_ACTIVE_START_TOP			40
 #define OV8865_ACTIVE_WIDTH			3264
 #define OV8865_ACTIVE_HEIGHT			2448
 
Signature · 1 line
2.25.1
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com