[v2,0/3] ipu3: Fix support for small sensors such as the OV9734
mbox series

Message ID 20261112085159.14289-1-guyliandejong@proton.me
Headers show
Series
  • ipu3: Fix support for small sensors such as the OV9734
Related show

Message

GuyliandeJong Nov. 12, 2026, 8:52 a.m. UTC
This series fixes three issues found while bringing up the OV9734 front
camera of the Microsoft Surface Laptop 2 (Intel IPU3) with libcamera and
PipeWire. None of the fixes is specific to that laptop.

Patch 1/3 adds a camera sensor helper for the OV9734. Without it the
IPU3 IPA fails to initialize.

Patch 2/3 initializes the cached test pattern mode in CameraSensorLegacy
and CameraSensorRaw. It was left uninitialized, which made the IPU3
start() fail at random for sensors without test pattern support.

Patch 3/3 bounds the default IPU3 viewfinder size to what validate()
accepts. For sensors no wider than 1280 pixels or no taller than 736
lines, validate() always adjusted the reported size, which made
WirePlumber abort.

v2 was tested on a Surface Laptop 2 on top of master: three captures in
a row start without failure, and 1280x704 is the default viewfinder size.

Changes since v1:
- Patch 1/3: Use a black level of 0x10 at 10 bits (1024 at 16 bits)
  instead of 0x40. The v1 value was not verified. Raw frames captured
  with the lens covered average 16.7 to 17.0 in all Bayer channels,
  which matches the BLC target register default pointed out by
  Barnabás.
- Patch 2/3: Collect Reviewed-by.
- Collect Afonso's Tested-by (Surface Laptop 1) on all patches.
- Rebase on master.

v1: <20261103104131.87331-1-guyliandejong@proton.me>

GuyliandeJong (3):
  libipa: camera_sensor_helper: Add OV9734
  libcamera: camera_sensor: Initialize test pattern mode
  libcamera: pipeline: ipu3: Bound viewfinder size to the ImgU limits

 src/ipa/libipa/camera_sensor_helper.cpp       | 13 +++++++++++++
 src/libcamera/pipeline/ipu3/ipu3.cpp          |  8 ++++++--
 src/libcamera/sensor/camera_sensor_legacy.cpp |  1 +
 src/libcamera/sensor/camera_sensor_raw.cpp    |  6 ++++--
 4 files changed, 24 insertions(+), 4 deletions(-)