media: i2c: ov9282: fix strobe timing and control handling
Get series with b4
b4 am [email protected] change-id 20260909-ov9282-fixes-da986dabc238Versions newest first
- v4 Latest8 patches 0 repliesNew
- v38 patches 2 repliesSuperseded
- v28 patches 6 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 10 patches | 32 replies | Superseded |
Changes in v4 from the cover letter
- Replace DIV_ROUND_UP with DIV_ROUND_UP_ULL to fix 0-day finding
- Link to v3: https://patch.msgid.link/[email protected]
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | media: i2c: ov9282: handle error from exposure range updatedrivers/ | +2 | 0 replies | |
| 2/8 | media: i2c: ov9282: fix pixel rate and line time calculationdrivers/ | +36 | 0 replies | |
| 3/8 | media: i2c: ov9282: fix flash duration to/from microseconds conversiondrivers/ | +24 | 0 replies | |
| 4/8 | media: i2c: ov9282: fix flash duration range calculationdrivers/ | +31 | 0 replies | |
| 5/8 | media: i2c: ov9282: add refresh of additional ranges on a mode changedrivers/ | +31 | 0 replies | |
| 6/8 | media: i2c: ov9282: recalculate strobe span on HBLANK changedrivers/ | +9 | 0 replies | |
| 7/8 | media: i2c: ov9282: drop redundant vblank fielddrivers/ | +4 | 0 replies | |
| 8/8 | media: i2c: ov9282: harmonize dev_err_probe usagedrivers/ | +15 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Dave Stevenson |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/8] media: i2c: ov9282: fix strobe timing and control handling
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 v4:
- Replace DIV_ROUND_UP with DIV_ROUND_UP_ULL to fix 0-day finding
- Link to v3: https://patch.msgid.link/[email protected]
Changes in v3:
- Adapt commit texts for 4/8 and 5/8
- Thanks to Dave the review!
- Link to v2: https://patch.msgid.link/[email protected]
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/[email protected]
To: Sakari Ailus <[email protected]>
To: Dave Stevenson <[email protected]>
To: Mauro Carvalho Chehab <[email protected]>
To: Daniele Alessandrelli <[email protected]>
To: Paul J. Murphy <[email protected]>
To: Martina Krasteva <[email protected]>
To: Richard Leitner <[email protected]>
To: Hans Verkuil <[email protected]>
To: Bryan O'Donoghue <[email protected]>
To: Jacopo Mondi <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Gyula Kelemen <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
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: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20260909-ov9282-fixes-da986dabc238
Best regards,
Signature · 1 line
Richard Leitner <[email protected]>