From patchwork Sat Sep 26 21:56:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Alexander X-Patchwork-Id: 28384 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 E5365BDCBC for ; Sat, 26 Sep 2026 21:56:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EE183689CC; Sat, 26 Sep 2026 23:56:42 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=inspiredexperts.com header.i=@inspiredexperts.com header.b="Us6Np/W1"; dkim-atps=neutral Received: from s1.inspiredexperts.com (s1.inspiredexperts.com [162.243.156.162]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B570268615 for ; Sat, 26 Sep 2026 23:56:41 +0200 (CEST) Received: from poshta.inspiredexperts.com (s1.inspiredexperts.com [127.0.0.1]) by s1.inspiredexperts.com (Postfix) with ESMTPSA id 613C5D2D689; Sat, 26 Sep 2026 15:56:39 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inspiredexperts.com; s=default; t=1790459799; bh=CP0N33HNWbImOBsoGXL5gEZ/k/SF/VCWIcVG66i/VS4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Us6Np/W11eLCDu93SWKwHy23TbHbTTaBqsahzKD+3ZXBQah0Qmb1oFtIIp2DAg16R Z2BQaamT8HIhUTL/hKYWeg7O36KTgulfH7CQg5bx2lkv41YiTOMwL4x71+HoUNh9bN laCgj6l9ALJzrWPQN6LW8xHAM11SyJjUQsn05XlE= MIME-Version: 1.0 Date: Sat, 26 Sep 2026 15:56:39 -0600 From: James Alexander To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Kieran Bingham , =?utf-8?q?Barnab?= =?utf-8?b?w6FzIFDFkWN6ZQ==?= , Oleg Mikheev Subject: [PATCH v3] libcamera: camera_sensor_properties: Add OmniVision OV08X40 properties In-Reply-To: <20260916184959.204572-1-opensource@inspiredexperts.com> References: <178937182524.1723501.8634459218676024286@ping.linuxembedded.co.uk> <20260916184959.204572-1-opensource@inspiredexperts.com> Message-ID: <2c0debc3ddb9a381e6fd2511376d4394@inspiredexperts.com> X-Sender: opensource@inspiredexperts.com X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on s1.inspiredexperts.com 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" The ov08x40 sensor helper is already present, but the sensor has no static properties. This adds its documented 702 nm unit-cell size and test-pattern mapping. The unit-cell size comes from OmniVision's OV08X40 product information. Control delays remain unspecified so the common defaults are used. On the tested HP Spectre, setting the sensor's test-pattern control while streaming at 3848x2416 showed that driver value 2 produces eight full-height colour bars matching TestPatternModeColorBars after accounting for horizontal orientation. Values 1, 3, and 4 remain unmapped because their libcamera equivalents have not been established. Signed-off-by: James Alexander --- Changes in v3: - Correct the hardware-tested pattern mapping: value 2 produces eight full-height colour bars, not fading colour bars. - Leave values 1, 3, and 4 unmapped. Changes in v2: - Use the documented 0.702 um unit-cell size. - Map test-pattern value 2 to fading colour bars. - Use the default control delays. src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) .testPatternModes = { diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 20cfd0bc1..105c7334d 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -524,6 +524,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 2 }, } }, + { "ov08x40", { + .unitCellSize = { 702, 702 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 2 }, + /* + * No corresponding test pattern mode for + * 1: "Vertical Color Bar Type 1", + * 3: "Vertical Color Bar Type 3", + * 4: "Vertical Color Bar Type 4" + */ + }, + .sensorDelays = { }, + } }, { "ov8858", { .unitCellSize = { 1120, 1120 },