From patchwork Tue Oct 21 08:06:50 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: 24708 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 27A97C3259 for ; Tue, 21 Oct 2025 08:06:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D9BBA60769; Tue, 21 Oct 2025 10:06:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PcHKjAbz"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C6AB860757 for ; Tue, 21 Oct 2025 10:06:54 +0200 (CEST) Received: from pb-laptop.local (185.221.141.231.nat.pool.zt.hu [185.221.141.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 787E51387; Tue, 21 Oct 2025 10:05:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761033911; bh=fnJIQywSh1uz7dx31rDPvbe306BL5cGXYnbF+W5DOYw=; h=From:To:Cc:Subject:Date:From; b=PcHKjAbzlDU5VWhJlgeD0RDJXwZ35qZb+BRfT/zGnwBLVGWiKoHdzjte1WHuxYkf7 /hnnZQc7bN8eTIWLGE+qFdIQmTOOI8CbP0YwozI+Df3hgjoEctwXAjm/oDSWiE8u/B sM9Ephe9dDhWwNSs9uPt/NZPTWcjyFdT58KOlH9c= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [RFC PATCH v1 1/2] libipa: camera_sensor_helper: Add imx708 Date: Tue, 21 Oct 2025 10:06:50 +0200 Message-ID: <20251021080651.401753-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.1.dirty 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 modules had the corresponding helper classes since 952ef94ed78d71 in 2023. The camera sensor properties database also has an entry for it, but the camera sensor helper classes are missing from the common libipa component. So add camera sensor helper classes for all four variants of the sensor (wide, noir). The gain calculation matches that in the raspberry pi ipa. Signed-off-by: Daniel Scally [Add variants, rewrite commit message.] Signed-off-by: Barnabás Pőcze --- src/ipa/libipa/camera_sensor_helper.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index ef3bd0d62..829743a6d 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -642,6 +642,31 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477) +class CameraSensorHelperImx708 : public CameraSensorHelper +{ +public: + CameraSensorHelperImx708() + { + gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) + +class CameraSensorHelperImx708Wide : public CameraSensorHelperImx708 +{ +}; +REGISTER_CAMERA_SENSOR_HELPER("imx708_wide", CameraSensorHelperImx708Wide) + +class CameraSensorHelperImx708NoIR : public CameraSensorHelperImx708 +{ +}; +REGISTER_CAMERA_SENSOR_HELPER("imx708_noir", CameraSensorHelperImx708NoIR) + +class CameraSensorHelperImx708WideNoIR : public CameraSensorHelperImx708 +{ +}; +REGISTER_CAMERA_SENSOR_HELPER("imx708_wide_noir", CameraSensorHelperImx708WideNoIR) + class CameraSensorHelperOv2685 : public CameraSensorHelper { public: From patchwork Tue Oct 21 08:06:51 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: 24709 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 CD579C32CE for ; Tue, 21 Oct 2025 08:06:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0FA306076C; Tue, 21 Oct 2025 10:06:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="aMehpIFO"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 145656075A for ; Tue, 21 Oct 2025 10:06:55 +0200 (CEST) Received: from pb-laptop.local (185.221.141.231.nat.pool.zt.hu [185.221.141.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C6601149B for ; Tue, 21 Oct 2025 10:05:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761033911; bh=oWdCvliiAUzpF7sw87NlQ6l4f4MQN31TRczEezald6c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aMehpIFOfN3Gi7E4Q0znw7HokMD3q7LHNqqv6ZkV0aEYcz8TQq0oFA/E67LPoe+H+ uvcVZU/Y/o12kMRuQZxCD/4pI98sXhA5E/5VM/R2yqtNOwUoc9suLmOBnDWTLHNvNj Xe8JXz5qPNe72mfXYrLK94xL6ZLOVXgif7Smk8xk= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 2/2] libcamera: camera_sensor_properties: Add imx708 variants Date: Tue, 21 Oct 2025 10:06:51 +0200 Message-ID: <20251021080651.401753-2-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.1.dirty In-Reply-To: <20251021080651.401753-1-barnabas.pocze@ideasonboard.com> References: <20251021080651.401753-1-barnabas.pocze@ideasonboard.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" The imx708 variants (wide, noir) were missing from the camera property database. So add them with the same values as the base model since the lack of infrared filter / wide angle lens have no effect on these properties. Signed-off-by: Barnabás Pőcze --- .../sensor/camera_sensor_properties.cpp | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index b217363d8..9ca01fd87 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -325,6 +325,54 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 3 }, } }, + { "imx708_wide", { + .unitCellSize = { 1400, 1400 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + { controls::draft::TestPatternModeSolidColor, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, + { controls::draft::TestPatternModePn9, 4 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 3, + .hblankDelay = 3 + }, + } }, + { "imx708_noir", { + .unitCellSize = { 1400, 1400 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + { controls::draft::TestPatternModeSolidColor, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, + { controls::draft::TestPatternModePn9, 4 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 3, + .hblankDelay = 3 + }, + } }, + { "imx708_wide_noir", { + .unitCellSize = { 1400, 1400 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + { controls::draft::TestPatternModeSolidColor, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, + { controls::draft::TestPatternModePn9, 4 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 3, + .hblankDelay = 3 + }, + } }, { "ov2685", { .unitCellSize = { 1750, 1750 }, .testPatternModes = {