From patchwork Thu Nov 12 08:52:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: GuyliandeJong X-Patchwork-Id: 28869 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E33A8C3304 for ; Thu, 12 Nov 2026 08:52:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3D4C66917B; Thu, 12 Nov 2026 09:52:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=proton.me header.i=@proton.me header.b="T+HTXAqx"; dkim-atps=neutral Received: from mail-24418.protonmail.ch (mail-24418.protonmail.ch [109.224.244.18]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E4918690E6 for ; Thu, 12 Nov 2026 09:52:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail2; t=1794473529; x=1794732729; bh=HDkmb25pjjKFx9XqMWiOtSB1tLF6z0MnbQ9P+qTLO4M=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=T+HTXAqxy/USsHABfqd/AQtof4hKFFfgljSHKpflr3xDfBODcAFrL3BbAN1hQdJu1 yLzBfCBhXmzxkf+U3lpNd4m+Csj+7k15m0O1jYv1lf1KHBV4UEAdr0622oZ6Awzsil ZI32CjFeerYC0SPhzFNLuqF1YLIJJdCylSDW9pefGknxSLCMZzEUThH4denL4d2Hg+ YWWG3pxXm/sulOIFMz2dOd0e0VAL3bOwpWIrM0u2HsoIA2zvk5uMeL/9s77FtI31e7 R5PP14jkP5AEh44rHR2qkBv5I+EpZVquqKmo/THpzquFT4zsu+8Md0nVJfiKN+MGVC ZPlapfUYD6Hzw== Date: Thu, 12 Nov 2026 08:52:05 +0000 To: libcamera-devel@lists.libcamera.org From: GuyliandeJong Cc: Barnabas Pocze , Afonso Figuinha Subject: [PATCH v2 0/3] ipu3: Fix support for small sensors such as the OV9734 Message-ID: <20261112085159.14289-1-guyliandejong@proton.me> In-Reply-To: <20261103104131.87331-1-guyliandejong@proton.me> References: <20261103104131.87331-1-guyliandejong@proton.me> Feedback-ID: 112452169:user:proton X-Pm-Message-ID: 8814270c93043bc2e538e3e43fe2f7c5f186c6b7 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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(-)