From patchwork Tue Oct 28 09:37:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 24849 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 76492C3259 for ; Tue, 28 Oct 2025 09:37:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A4B93607B2; Tue, 28 Oct 2025 10:37:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="W1BEFM97"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 11CA7603ED for ; Tue, 28 Oct 2025 10:37:24 +0100 (CET) Received: from pb-laptop.local (185.182.215.162.nat.pool.zt.hu [185.182.215.162]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 71989176B; Tue, 28 Oct 2025 10:35:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761644135; bh=jDWLzRqTB9z4f1yDCiUK7djK7oIQCXp2GG6ZerHzVTk=; h=From:To:Cc:Subject:Date:From; b=W1BEFM97wNN8PL+SAVDtt5cuUnp3627mzZM/oFhM9nFPAh9UjbIobZfNK9bOP/mP9 yw/uf97kmFFgamTiQj5cB8FLtfEok5HXOGyY+1LWlpGZYs8fXz9EIrhVOQvOYyiXYy e1QLzKHfAfx9+BZFUhCutefHm1j7XDX0/zbRUIjE= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally , Kieran Bingham Subject: [RFC PATCH v3] libipa: camera_sensor_helper: Add imx708 Date: Tue, 28 Oct 2025 10:37:20 +0100 Message-ID: <20251028093720.383810-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.1 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: Daniel Scally The imx708 sensor driver has long been available, especially in raspberry pi kernels; and the raspberry pi ipa module has had the corresponding helper class since 2023 (952ef94ed78d71). The camera sensor properties database also has an entry for it (2fb0f250196326), but the camera sensor helper class is missing from the common libipa component. So add it, with the same gain formula present in the raspberry pi ipa module, and the black level taken from the rpi tuning files. Handling the raspberry pi specific "wide" / "noir" suffixes is omitted. They are not present in the camera sensor properties database either. Signed-off-by: Daniel Scally [Add black level, extend commit message.] Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham --- changes in v3: * add black level as well changes in v2: * drop rpi specific suffixes v2: https://patchwork.libcamera.org/patch/24765/ v1: https://patchwork.libcamera.org/patch/24708/ --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.51.1 diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index ef3bd0d621..e3e3e53554 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -642,6 +642,17 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477) +class CameraSensorHelperImx708 : public CameraSensorHelper +{ +public: + CameraSensorHelperImx708() + { + blackLevel_ = 4096; + gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) + class CameraSensorHelperOv2685 : public CameraSensorHelper { public: