From patchwork Wed May 6 23:07:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: devve X-Patchwork-Id: 26658 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 1F094C32FC for ; Wed, 6 May 2026 23:07:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EE23063038; Thu, 7 May 2026 01:07:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CqCVXTab"; dkim-atps=neutral Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2020063024 for ; Thu, 7 May 2026 01:07:28 +0200 (CEST) Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-8e8c0c2d2bcso34885285a.1 for ; Wed, 06 May 2026 16:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778108847; x=1778713647; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LaTrKnaEFSG6R1dixgnlxJZEG75nGFBB6KtmVy+2B9E=; b=CqCVXTabuBU0AfBEH9rYt1dEb/pYBsatGCr+sk7WgxKDYss6Pe4hBMYaqgySo822lQ ZQ0E1WRz5v9MabIqgUYkDycrRdyWZXOJU5UPyRPPJRilceEa9ku5lQlvlWjfN1vfLvem i4Z2N0PmfGxCcfm2jJMgvnAlEsrIGFkyNiPS1Ov1tFhuyHnFHFsd1UHwHxH1RCxRAwBT PKgnDtApX/dp10Prd3NjuhHSL1GeTVY+i5FDnNGxx0ciT5BTM4Ip2WEYnDV6MOVm/eJj 5hxyMev/7HUjc3aDBpunfje7xalnXIw0RhAKPV/jUFUWrGFbhqSAI9DDlvTXDO95Js3B hTpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778108847; x=1778713647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LaTrKnaEFSG6R1dixgnlxJZEG75nGFBB6KtmVy+2B9E=; b=GBl4VeNsmpaD8ZpEblhbVtuDxB1I1W1VyVT860czt91DaVpFT1+ueWK0k9yQ5NVrIB RtzYb6Xh8UfDwbhLtLBN+noD7ZQy7QgHpmrZFgdGbIIZa0VwjyQxa7mm9aKFZT3eIum6 itEiH1XM09wFJAIuJ3kJonJupAcys3PTXpe9xizOufbwbBf89bLn61mpNEQXF+mXsM2v +iJdbUsSpBm3vm0NHCMyWt8LLUY8fTc9WIrTxMLrLVK/WRKDCXCP63GUus+IuCMOB4Qa wZSGtK1nmoGROR6qJx6h65txiZEIqmVijQmt0L9yeSCnMRhAG5wnBTS8Zf8cEQK8WDlZ nYlA== X-Gm-Message-State: AOJu0YxbSb6O4DMt0YNakxBVGbaKl2UZ0sDdHfKDnGtqzmofUFyGORwB Ed1t8yKpaN9emWrQNMtH0eX3yNxsdPFGclfyZo9R15aRbCIDcTbMOH9XLM3jtw== X-Gm-Gg: AeBDievxyfJaJOO3o2N41/N9HTpZo82RsUNCMDC9JaXZjkSSlabpUQE0B1gQeNC7FAD xrbbRCNGDrIaeeaQzeuxn5QgbwoyOA4dIrSfdsCkchwTaQxiFW0AnbqQcqpx3KU/KzojCW7jZdO mocaX4DJU69GelW9YCFG+I4x4g53JhQiSnp8gZo+N2R8b822W3zeK5lzT7am33GTfvb5OQT4PZ+ nqRFbKlt3jLogrX3OgGk40sGa9h2icOqXhoqLOZg9QP1RGYBbZz+BHnLbzizFHS3wC2RebyemTC N0t7C9xrfzC8yxhKGi6Rz2aWi9BlzvGyIqE3zBxSTqyRgMF1N8tX7okylstkvg5MQE1mzN/S3PO O8diLsar5CM+n3aoScud4BXz1H98v0G1V28TIEdCmERc8JFzwup6MIu32PK/hh7SRwDUwZpvas2 PzjQAmIY5N8gR+K0bMJ/s1aF4h2s44+HxL2rf1wQeazEKYkKhulho+NYDne1YPhjrZPWcNq98oI ejzi6MoZTJo8Ez/1ThfW8JMtdDoZt+s X-Received: by 2002:a05:620a:4505:b0:8cf:d9ce:378b with SMTP id af79cd13be357-904d3fa449cmr785076785a.2.1778108846655; Wed, 06 May 2026 16:07:26 -0700 (PDT) Received: from dexps.speedport.ip (p200300eda74453cf3cf3f7929e513b94.dip0.t-ipconnect.de. [2003:ed:a744:53cf:3cf3:f792:9e51:3b94]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8fc2c25324esm2035266385a.23.2026.05.06.16.07.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 16:07:26 -0700 (PDT) From: d3vv3 To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 01/10] ipa: libipa: camera_sensor_helper: Add OV01A10 Date: Thu, 7 May 2026 01:07:13 +0200 Message-ID: <20260506230722.1041596-2-devve.3@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260506230722.1041596-1-devve.3@gmail.com> References: <20260506230722.1041596-1-devve.3@gmail.com> 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" From: Stuart J Mackintosh Add a CameraSensorHelper for the OmniVision OV01A10 image sensor, used in Dell XPS 13 and other laptops with the Intel IPU6 camera subsystem. The analogue gain register (0x3508) uses a Q6.8 fixed-point format, with the minimum value OV01A10_ANAL_GAIN_MIN = 0x100 representing unity gain. This gives the linear model: gain = code / 256 Hans de Goede confirmed linear behaviour by monitoring the 18% grey patch of a Macbeth chart under controlled lighting while stepping the gain control. The black level of 0x40 at 10 bits (4096 scaled to 16 bits) was confirmed by dark frame measurement with the lens covered. Without this helper, libcamera's AGC algorithm cannot convert between gain codes and real gain values, causing auto-exposure oscillation and the following warning: IPASoft: Failed to create camera sensor helper for ov01a10 Signed-off-by: Stuart J Mackintosh --- src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index e3e3e535..72466867 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -653,6 +653,18 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) +class CameraSensorHelperOv01a10 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv01a10() + { + /* From dark frame measurement: 0x40 at 10bits. */ + blackLevel_ = 4096; + gain_ = AnalogueGainLinear{ 1, 0, 0, 256 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov01a10", CameraSensorHelperOv01a10) + class CameraSensorHelperOv2685 : public CameraSensorHelper { public: