From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Martina Krasteva <martinax.krasteva@intel.com>,
Daniele Alessandrelli <daniele.alessandrelli@intel.com>,
"Paul J. Murphy" <paul.j.murphy@intel.com>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: [PATCH] media: i2c: ov9282: Correct the exposure offset
Date: Mon, 09 Dec 2024 14:55:45 +0000 [thread overview]
Message-ID: <20241209-media-ov9282-fix-v1-1-d06bb7546f18@raspberrypi.com> (raw)
The datasheet lists that "Maximum exposure time is frame
length -25 row periods, where frame length is set by
registers {0x380E, 0x380F}".
However this driver had OV9282_EXPOSURE_OFFSET set to 12
which allowed that restriction to be violated, and would
result in very under-exposed images.
Correct the offset.
Fixes: 14ea315bbeb7 ("media: i2c: Add ov9282 camera sensor driver")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
This was picked up by one of our users noting that images were
going dark for captures through libcamera. libcamera was resetting
vblank and hblank to minimums for the capture, and that put us in
the situation where it broke the datasheet requirement for
exposure being at least 25 lines shorter than the frame length.
---
drivers/media/i2c/ov9282.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
index 9f52af6f047f..87e5d7ce5a47 100644
--- a/drivers/media/i2c/ov9282.c
+++ b/drivers/media/i2c/ov9282.c
@@ -40,7 +40,7 @@
/* Exposure control */
#define OV9282_REG_EXPOSURE 0x3500
#define OV9282_EXPOSURE_MIN 1
-#define OV9282_EXPOSURE_OFFSET 12
+#define OV9282_EXPOSURE_OFFSET 25
#define OV9282_EXPOSURE_STEP 1
#define OV9282_EXPOSURE_DEFAULT 0x0282
---
base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
change-id: 20241209-media-ov9282-fix-a1ec012f5272
Best regards,
--
Dave Stevenson <dave.stevenson@raspberrypi.com>
next reply other threads:[~2024-12-09 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 14:55 Dave Stevenson [this message]
2024-12-09 15:05 ` Kieran Bingham
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=20241209-media-ov9282-fix-v1-1-d06bb7546f18@raspberrypi.com \
--to=dave.stevenson@raspberrypi.com \
--cc=daniele.alessandrelli@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=martinax.krasteva@intel.com \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=paul.j.murphy@intel.com \
--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®