From patchwork Thu Nov 5 13:07:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 28774 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 548DBC3307 for ; Thu, 5 Nov 2026 13:09:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 054006A7BA; Thu, 5 Nov 2026 14:09:10 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Q4IdJC36"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D76AF6A7B1 for ; Thu, 5 Nov 2026 14:09:08 +0100 (CET) Received: from mail.ideasonboard.com (unknown [IPv6:2401:4900:1c67:cdf:7464:6c04:36e4:ee87]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DD2A35E; Thu, 5 Nov 2026 14:06:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1793884010; bh=YgpeFNEU5YNIz2ySSaK+IeQhpr2QNAvhRhCpmwC7E8g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Q4IdJC362ZJx/z4R1FgvfYUOiXA7UYHz2RycDAmMst91ZFHo+G6GOHfqTiW1fI+yD lpBEO8cEm0QixWAuvy0fzbTKm8Kr+Xd+Bd5KjuZWYVExqjPhAo+z2Iz+4fGyFmN4Lx ONSWLtITnsSFhb5JpxkZgVlXVLFUls5sqXm+29eQ= From: Jai Luthra Date: Thu, 05 Nov 2026 18:37:49 +0530 Subject: [PATCH v3 2/4] libcamera: camera_sensor: Add properties and helpers for Sony IMX585 and IMX676 MIME-Version: 1.0 Message-Id: <20261105-mainline-imx676-v3-2-a2622d41659b@ideasonboard.com> References: <20261105-mainline-imx676-v3-0-a2622d41659b@ideasonboard.com> In-Reply-To: <20261105-mainline-imx676-v3-0-a2622d41659b@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , Laurent Pinchart , Kieran Bingham , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= , Dave Stevenson , Jai Luthra X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3112; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=YgpeFNEU5YNIz2ySSaK+IeQhpr2QNAvhRhCpmwC7E8g=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBq7H/hU/ktboNf41hl83KoYmNJlf7sxIuKy1q5P CqrzDupVW+JAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCaux/4QAKCRBD3pH5JJpx RSW4D/9+R0GMBj9nlWeql0O5hWC5mJt0bdL1PPkz536NbTCvbNSNQC1ya8T+eXSoqsmvuGSFac9 yIdP7OhjecOX7Qcb7RFE5aVKKekYMVUjzsFs2zI8bg5dJ6MvQ/e0Bx0dMl5auBRCd80qGTUZLoJ XBQC6bqADsM4G9lCw8Ct4FIPu01BfPHyO5FTfwqMUbb5gsm6twoQ/FjYhPBbtl7N6AvyZxPEmfK UhH77w1mCAKSeoS0FNv/OKvLY+b3CAHXZFiV0jGJNSaP7wEkb1aU8ko67BFT9KSCg8DcAtM2h0L XyB6aMqzZ7tMqDmvk1sJIsuTxXQTF22XHUhMUzTKBR295ZkN7glDjp1fTjO80A0mwvKPqHtHnHQ nnuftJZlvvmxzaXnUOIUg+GsDQUlXmlDdBiOUbNP2S4nVPb1ZfwrQfIEOp5cfYAEan+jxp+69Q0 Rp6tgZcaGgCdPWtUDkVjRSnWue02XHrRWg1uSs0H3TxXQuoouMqJDouSg4EI9xFIARC9HV/y9Tj j00ASmf7UJGXBpbU3wfRU7VRCEYsVTUFGMRLubIyDFR41Ua9LIDHD7/qUcOnM+ku7jRqzxyqojY o+Wu8Dj6cOtJ3gNCrPYHvY7X6epJYsrnQsf4tdSmcq7t8eXaJgvi9qjKcgaQDFpbMqwlHnsHVtF CCNG4tAToGefdRw== X-Developer-Key: i=jai.luthra@ideasonboard.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 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" Sony IMX585 (8.4MP) and IMX676 (12.6MP) are Starvis 2 sensors, with very similar properties to IMX662 and IMX678. Add the camera sensor properties for both. To my knowledge, all of these 4 sensors have the same black level and gain models. For convenience use the IMX678 camera sensor helper for all of these 4. This of course can change if differences are found later. Reviewed-by: Kieran Bingham Signed-off-by: Jai Luthra --- src/ipa/libipa/camera_sensor_helper.cpp | 19 ++++++------------- src/libcamera/sensor/camera_sensor_properties.cpp | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 3b22b04dcc94..57f21b35dc49 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -662,18 +662,10 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx477, "imx477") -class CameraSensorHelperImx662 : public CameraSensorHelper -{ -public: - CameraSensorHelperImx662() - { - /* From datasheet: 0xc8 at 12bits. */ - blackLevel_ = 3200; - gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; - } -}; -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx662, "imx662") - +/* + * Reusing CameraSensorHelperImx678 for multiple sensors, for convenience. + * They may need to be split apart if any differences are found later. + */ class CameraSensorHelperImx678 : public CameraSensorHelper { public: @@ -684,7 +676,8 @@ public: gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; } }; -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx678, "imx678") +REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx678, "imx585", "imx662", + "imx676", "imx678") class CameraSensorHelperImx708 : public CameraSensorHelper { diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 20cfd0bc11a6..1916e905cb7c 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -340,6 +340,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 3 }, } }, + { "imx585", { + .unitCellSize = { 2900, 2900 }, + .testPatternModes = {}, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "imx662", { .unitCellSize = { 2900, 2900 }, .testPatternModes = {}, @@ -350,6 +360,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 2 }, } }, + { "imx676", { + .unitCellSize = { 2000, 2000 }, + .testPatternModes = {}, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "imx678", { .unitCellSize = { 2000, 2000 }, .testPatternModes = {},