From patchwork Sun Aug 2 13:59:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: j4niwzis X-Patchwork-Id: 27539 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 0B40AC32FE for ; Sun, 2 Aug 2026 13:59:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0DCFE67FEA; Sun, 2 Aug 2026 15:59:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=proton.me header.i=@proton.me header.b="VRYfHKgM"; dkim-atps=neutral Received: from mail-24425.protonmail.ch (mail-24425.protonmail.ch [109.224.244.25]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CB40C67FC1 for ; Sun, 2 Aug 2026 15:59:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1785679151; x=1785938351; bh=QgB9ZY1Lr8iZIRG2Bw98gOl3bg7XYQ/PECaKwOBmQbw=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=VRYfHKgMdlECZJtjqpXz4VYNN3LVpVI0qgYbGOMESDPD7wjcOZatM5z1MG6tNKGdT WIu1ca1OQDrRVpPNY6PqeDZkoR1SjeqHlc4s9c8fXaso0Xv33HGg8ez07Z6hiqYABx qv2UYOinP3WrGOVYYG139pac4KIpmPU5xcsp4W3cJHNqqiL4LIdVC15NeGkFDhGRWB k18ySLUlSjdD53ljOCYlw4eMkfyH6BMfV4cIhyIuq134mpWX0unpSh9+/RBwPhLxUy PIgeUc0Ht23hzIxLqJ+KDZCNcLPwUiR5Rr88tdxepluzIwRLoJN8PAQjG5ihr3rgdz tLFR9tl+YJdlA== Date: Sun, 02 Aug 2026 13:59:08 +0000 To: "libcamera-devel@lists.libcamera.org" From: j4niwzis Subject: [PATCH 1/3] libcamera: camera_sensor_properties: Add IMX582, IMX586 and OV8856 Message-ID: Feedback-ID: 156040633:user:proton X-Pm-Message-ID: 003ab1e69cfe7b533b5d57b06f0d3703482ab7a6 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" All three are on the Xiaomi Mi 9T: the IMX582 is its wide camera, the OV8856 its telephoto one, and the IMX586 is the same silicon as the IMX582 with phase detection, described by the same driver. Without an entry the unit cell falls back to one micrometre, which throws off every field of view calculation. The pitch is 0.8 um for the quad bayer 48 megapixel Sony parts and 1.12 um for the OV8856. The test pattern numbering of the Sony parts is the MIPI CCS one implemented by their register 0x0600; the OV8856 exposes the two bar patterns of its register 0x5e00, the same its sibling the OV8858 does. Signed-off-by: j4niwzis diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -325,6 +325,38 @@ .hblankDelay = 3 }, } }, + { "imx582", { + .unitCellSize = { 800, 800 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeSolidColor, 1 }, + { controls::draft::TestPatternModeColorBars, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, + { controls::draft::TestPatternModePn9, 4 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 3, + .hblankDelay = 3 + }, + } }, + { "imx586", { + .unitCellSize = { 800, 800 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeSolidColor, 1 }, + { controls::draft::TestPatternModeColorBars, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, + { controls::draft::TestPatternModePn9, 4 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 3, + .hblankDelay = 3 + }, + } }, { "imx662", { .unitCellSize = { 2900, 2900 }, .testPatternModes = {}, @@ -495,6 +527,15 @@ .hblankDelay = 2 }, } }, + { "ov8856", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 2 }, + }, + .sensorDelays = { }, + } }, { "ov8858", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {