From: Richard Leitner <richard.leitner@linux.dev>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Daniele Alessandrelli <daniele.alessandrelli@gmail.com>,
"Paul J. Murphy" <paul.j.murphy@intel.com>,
Martina Krasteva <martinax.krasteva@intel.com>,
Richard Leitner <richard.leitner@linux.dev>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
Bryan O'Donoghue <bod@kernel.org>,
Jacopo Mondi <jacopo@jmondi.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Gyula Kelemen <gyula.kelemen@advasolutions.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: [PATCH v2 0/8] media: i2c: ov9282: fix strobe timing and control handling
Date: Wed, 14 Oct 2026 08:49:07 +0200 [thread overview]
Message-ID: <20261014-ov9282-fixes-v2-0-3bb376d8b1a9@linux.dev> (raw)
This series fixes a set of related issues in the OV9282 strobe timing
and control handling code.
The driver updated exposure- and flash duration-related control ranges
in several places, but some of those updates used an incorrect timebase
or were triggered too late, which could leave the controls clamped
against stale values.
The series:
- checks the return value of the exposure range update
- drops the redundant vblank field
- converts probe error messages to dev_err_probe()
- fixes the 8-bit pixel rate (192 MHz instead of 200 MHz) and the
corresponding line time calculation
- treats the strobe frame span as a line count and converts the flash
duration accordingly
- fixes the flash duration range (min/max/default) and refreshes it on
HBLANK changes, independent of the sensor power state
- refreshes the exposure and flash duration ranges on mode changes
- reprograms the strobe span when HBLANK changes
This series was tested with an ov9282 sensor on a vision components camera
module attached to an i.MX8MP mainboard in a defined (dark) environment
with a custom made LED flash pcb.
Any feedback is warmly welcome.
Thanks!
---
Changes in v2:
- New patch: fix the 8-bit pixel rate.
- New patch: re-write strobe span and HTS in s_ctrl when HBLANK changes
- Calculate line time in ns using 64-bit math instead of 32-bit µs
- Treat the strobe frame span as a line count and reuse the helpers of the
exposure -> drop OV9282_STROBE_SPAN_FACTOR
- Flash duration range: min is 1 line, max is S32_MAX instead of the
current exposure time, default is converted from the register default
- Refresh the flash duration range on HBLANK changes instead of on
exposure/gain writes, so it is also correct while the sensor is idle
- Add missing "\n" to dev_err_probe() messages
- Add Fixes: and Cc: stable tags where applicable
- Reorder patches to keep non-fixes at the end
- Reword commit messages and subjects
- Thanks to Dave, Bryan and Sakari for the review!
- Link to v1: https://patch.msgid.link/20260914-ov9282-fixes-v1-0-f520af59df1b@linux.dev
To: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
To: Paul J. Murphy <paul.j.murphy@intel.com>
To: Martina Krasteva <martinax.krasteva@intel.com>
To: Richard Leitner <richard.leitner@linux.dev>
To: Hans Verkuil <hverkuil+cisco@kernel.org>
To: Bryan O'Donoghue <bod@kernel.org>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Gyula Kelemen <gyula.kelemen@advasolutions.com>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Richard Leitner (8):
media: i2c: ov9282: handle error from exposure range update
media: i2c: ov9282: fix pixel rate and line time calculation
media: i2c: ov9282: fix flash duration to/from microseconds conversion
media: i2c: ov9282: fix flash duration range calculation
media: i2c: ov9282: add refresh of additional ranges on a mode change
media: i2c: ov9282: recalculate strobe span on HBLANK change
media: i2c: ov9282: drop redundant vblank field
media: i2c: ov9282: harmonize dev_err_probe usage
drivers/media/i2c/ov9282.c | 236 +++++++++++++++++++++++++++------------------
1 file changed, 144 insertions(+), 92 deletions(-)
---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
change-id: 20260909-ov9282-fixes-da986dabc238
Best regards,
--
Richard Leitner <richard.leitner@linux.dev>
next reply other threads:[~2026-10-14 6:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 6:49 Richard Leitner [this message]
2026-10-14 6:49 ` [PATCH v2 1/8] media: i2c: ov9282: handle error from exposure range update Richard Leitner
2026-10-14 6:49 ` [PATCH v2 2/8] media: i2c: ov9282: fix pixel rate and line time calculation Richard Leitner
2026-10-14 6:49 ` [PATCH v2 3/8] media: i2c: ov9282: fix flash duration to/from microseconds conversion Richard Leitner
2026-10-14 6:49 ` [PATCH v2 4/8] media: i2c: ov9282: fix flash duration range calculation Richard Leitner
2026-10-14 6:49 ` [PATCH v2 5/8] media: i2c: ov9282: add refresh of additional ranges on a mode change Richard Leitner
2026-10-14 6:49 ` [PATCH v2 6/8] media: i2c: ov9282: recalculate strobe span on HBLANK change Richard Leitner
2026-10-14 6:49 ` [PATCH v2 7/8] media: i2c: ov9282: drop redundant vblank field Richard Leitner
2026-10-14 6:49 ` [PATCH v2 8/8] media: i2c: ov9282: harmonize dev_err_probe usage Richard Leitner
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=20261014-ov9282-fixes-v2-0-3bb376d8b1a9@linux.dev \
--to=richard.leitner@linux.dev \
--cc=bod@kernel.org \
--cc=daniele.alessandrelli@gmail.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=gyula.kelemen@advasolutions.com \
--cc=hverkuil+cisco@kernel.org \
--cc=jacopo@jmondi.org \
--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 \
--cc=stable@vger.kernel.org \
/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®