mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthias Fend <matthias.fend@emfend.at>
To: Jimmy Su <jimmy.su@intel.com>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	 devicetree@vger.kernel.org,
	Matthias Fend <matthias.fend@emfend.at>,
	 bsp-development.geo@leica-geosystems.com
Subject: [PATCH v2 2/9] media: i2c: ov08d10: fix image vertical start setting
Date: Mon, 09 Mar 2026 18:07:04 +0100	[thread overview]
Message-ID: <20260309-ov08d10-v2-2-81f8b5d99984@emfend.at> (raw)
In-Reply-To: <20260309-ov08d10-v2-0-81f8b5d99984@emfend.at>

The current settings for the "image vertical start" register appear to be
incorrect. While this only results in an incorrect start line for native
modes, this faulty setting causes actual problems in binning mode. At least
on an i.MX8MP test system, only corrupted frames could be received.
To correct this, the recommended settings from the reference register sets
are used for all modes. Since this shifts the start by one line, the Bayer
pattern also changes, which has also been corrected.

Fixes: 7be91e02ed57 ("media: i2c: Add ov08d10 camera sensor driver")
Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
---
 drivers/media/i2c/ov08d10.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/i2c/ov08d10.c b/drivers/media/i2c/ov08d10.c
index 5b02f61e359fa900da9290c1c151aa01b9d70e6e..5e1b8b58b3d64bcf20a7b1a4e47f547d2fd82998 100644
--- a/drivers/media/i2c/ov08d10.c
+++ b/drivers/media/i2c/ov08d10.c
@@ -217,7 +217,7 @@ static const struct ov08d10_reg lane_2_mode_3280x2460[] = {
 	{0x9a, 0x30},
 	{0xa8, 0x02},
 	{0xfd, 0x02},
-	{0xa1, 0x01},
+	{0xa1, 0x00},
 	{0xa2, 0x09},
 	{0xa3, 0x9c},
 	{0xa5, 0x00},
@@ -335,7 +335,7 @@ static const struct ov08d10_reg lane_2_mode_3264x2448[] = {
 	{0x9a, 0x30},
 	{0xa8, 0x02},
 	{0xfd, 0x02},
-	{0xa1, 0x09},
+	{0xa1, 0x08},
 	{0xa2, 0x09},
 	{0xa3, 0x90},
 	{0xa5, 0x08},
@@ -467,7 +467,7 @@ static const struct ov08d10_reg lane_2_mode_1632x1224[] = {
 	{0xaa, 0xd0},
 	{0xab, 0x06},
 	{0xac, 0x68},
-	{0xa1, 0x09},
+	{0xa1, 0x04},
 	{0xa2, 0x04},
 	{0xa3, 0xc8},
 	{0xa5, 0x04},
@@ -613,8 +613,8 @@ static const struct ov08d10_lane_cfg lane_cfg_2 = {
 static u32 ov08d10_get_format_code(struct ov08d10 *ov08d10)
 {
 	static const u32 codes[2][2] = {
-		{ MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10},
-		{ MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SGBRG10_1X10},
+		{ MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SGBRG10_1X10 },
+		{ MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10 },
 	};
 
 	return codes[ov08d10->vflip->val][ov08d10->hflip->val];

-- 
2.34.1


  parent reply	other threads:[~2026-03-09 17:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 17:07 [PATCH v2 0/9] drivers: media: i2c: Omnivision OV08D10 improvements Matthias Fend
2026-03-09 17:07 ` [PATCH v2 1/9] media: i2c: ov08d10: fix runtime PM handling in probe Matthias Fend
2026-03-10  9:12   ` Philipp Zabel
2026-03-09 17:07 ` Matthias Fend [this message]
2026-03-09 17:07 ` [PATCH v2 3/9] media: i2c: ov08d10: remove duplicate register write Matthias Fend
2026-03-09 17:07 ` [PATCH v2 4/9] media: i2c: ov08d10: fix some typos in comments Matthias Fend
2026-03-09 17:07 ` [PATCH v2 5/9] media: i2c: ov08d10: add missing newline to prints Matthias Fend
2026-03-09 17:07 ` [PATCH v2 6/9] dt-bindings: media: i2c: document Omnivision OV08D10 CMOS image sensor Matthias Fend
2026-03-10  8:27   ` Krzysztof Kozlowski
2026-03-17  8:44   ` Sakari Ailus
2026-03-09 17:07 ` [PATCH v2 7/9] media: i2c: ov08d10: add support for binding via device tree Matthias Fend
2026-03-09 17:07 ` [PATCH v2 8/9] media: i2c: ov08d10: add support for reset and power management Matthias Fend
2026-03-17  8:46   ` Sakari Ailus
2026-03-24  8:12     ` Matthias Fend
2026-03-24 10:32       ` Sakari Ailus
2026-03-09 17:07 ` [PATCH v2 9/9] media: i2c: ov08d10: add support for 24 MHz input clock Matthias Fend

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260309-ov08d10-v2-2-81f8b5d99984@emfend.at \
    --to=matthias.fend@emfend.at \
    --cc=bsp-development.geo@leica-geosystems.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jimmy.su@intel.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®