From patchwork Tue Nov 3 10:41:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: GuyliandeJong X-Patchwork-Id: 28766 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 D99DFC3358 for ; Tue, 3 Nov 2026 12:04:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7D73E6A7B4; Tue, 3 Nov 2026 13:04:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=proton.me header.i=@proton.me header.b="ILVK3TlI"; dkim-atps=neutral Received: from mail-244121.protonmail.ch (mail-244121.protonmail.ch [109.224.244.121]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D257691CA for ; Tue, 3 Nov 2026 11:41:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=sdvbhwirfnfzpates5oxnoywxe.protonmail2; t=1793702508; x=1793961708; bh=to9q3k2vMp29U0Y02vk6ol7iiqWhnXkaI4PEOiu/WgM=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=ILVK3TlIW82TN/cEE0mKMX6JX8KQiqFFBdAjupcJNw2DtI1Nas9LAzHbr6tijwXIs H/CdRPuxLwHOUUWIhdgkPCZKMv128iLFT2e3yxjATOYa2dc8pkVMu1OJkF5QR1nXHO Z7UQyQkJLdYy9PgfrNYGSWdpoghckwa6uOW34nC1EqJbsDym8SadOX6T+kTA5+xIA/ ltTBhAg30BNXmn2CxvrZFy0tlD3AECTJyP67vKLTgaZ9bN8++DRKcwBmrKrXdipUvA r2jtzI60IhFLm+rAOgGxA4M0p8xJvvmJrsj3kjLl0Qer0nlSVinL6PDmLaWg7IP+va xXCYgDmgaKZ2Q== Date: Tue, 03 Nov 2026 10:41:45 +0000 To: libcamera-devel@lists.libcamera.org From: GuyliandeJong Subject: [PATCH 0/3] ipu3: Fix support for small sensors such as the OV9734 Message-ID: <20261103104131.87331-1-guyliandejong@proton.me> Feedback-ID: 112452169:user:proton X-Pm-Message-ID: 70bb58d07761dc7edbf0cd6d01c75f98b7839abb MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 03 Nov 2026 13:04:24 +0100 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. 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(-)