| Message ID | 20261103104131.87331-1-guyliandejong@proton.me |
|---|---|
| Headers | show |
| Series |
|
| Related | show |
Hi Guylian,
I tested this series on a Microsoft Surface Laptop 1 (OV9734, IPU3),
on top of master (25cb6cd274d3), with the ov9734 kernel series from Tin
Posavec [1]:
- cam captures 1280x704 NV12 at 30 fps, three runs in a row with no
start failure;
- cam lists 1280x704 as the maximum viewfinder size.
Tested-by: Afonso Figuinha <afonso.figuinha@gmail.com>
Each run logs "Effective exposure value is 0. This is a bug in AGC and
must be fixed for proper operation." for the first two frames. It also
happens with the black level line of patch 1/3 removed, so it does not
seem to come from this series.
I posted a duplicate series by mistake and have withdrawn it. Its
patch 2/4 adds the OV9734 to the camera sensor properties database,
with the 1.4 um pixel size from the OmniVision product brief. I can
send it on its own, on top of your series.
[1] https://lore.kernel.org/linux-media/20261017-ov9734-ipu6-v1-0-86eab22ae258@gmail.com/
Thanks,
Afonso
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. The kernel side (power handling in the ov9734 driver and an ipu-bridge entry) is handled separately. 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. The fixes were tested on a Surface Laptop 2 on top of v0.7.2. Repeated camera starts succeed, and PipeWire streams up to 1024x600. On master, the series was build tested only. While rebasing I dropped a fix for an unsigned underflow of minIFHeight in calculateBDSHeight(), as commit b7a4bfe13e84 ("libcamera: pipeline: ipu3: Fix unsigned wrap in IF height search") already fixes it on master. 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(-)