From patchwork Thu Oct 22 15:48:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 28559 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 9016FC3261 for ; Thu, 22 Oct 2026 15:49:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 40A6C68F81; Thu, 22 Oct 2026 17:49:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nBrPwDrj"; 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 02C2268F6E for ; Thu, 22 Oct 2026 17:49:00 +0200 (CEST) Received: from mail.ideasonboard.com (unknown [IPv6:2401:4900:1c30:59f6:be2b:2877:6bc4:392]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5E4F6802; Thu, 22 Oct 2026 17:46:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1792684011; bh=abUnBFSbeCa+vIaYCVf+v4jWfSmR4LDo87jTnfroD7U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nBrPwDrjgjVvLbZOVra4B+w3cfp6fJRTRucqqiCPZjv7rExLElCT6Jj9ZI6upUo0D JEYmXSNZYdHOJyQ/tTujAoxEoOfKv/L4wCIEi4O2n01NbJv8QBq9fI4rYtjmZ0tEAN TY4ve8+R/Ldl2vXY68vIc5ohe9W6Mnq65/93CVAU= From: Jai Luthra Date: Thu, 22 Oct 2026 21:18:31 +0530 Subject: [PATCH v2 2/3] libcamera: camera_sensor: Add properties and helpers for Sony IMX585 and IMX676 MIME-Version: 1.0 Message-Id: <20261022-mainline-imx676-v2-2-0b839f1001c0@ideasonboard.com> References: <20261022-mainline-imx676-v2-0-0b839f1001c0@ideasonboard.com> In-Reply-To: <20261022-mainline-imx676-v2-0-0b839f1001c0@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=3086; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=abUnBFSbeCa+vIaYCVf+v4jWfSmR4LDo87jTnfroD7U=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBq2jBakuDRKlJl+/hiTXiTZnttmSSo0tENSbRH5 vUSxPLKT5WJAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCatowWgAKCRBD3pH5JJpx RYTbD/47/gOV0cm6M0Jn3Ve2OKXqLL44EPM4uoso1ZM3gW47L7qbZTIoWafQtFUH8vKoXoYeLO/ hR7fraC6uGwdw0C4Ge0KkhXKLo3RMD6hFDQrVneWvQ65qafmu3UXaRKuUHPLpMK1qA/3eGy6tRl fBS0PdYocusLHbPb49CAOzaDqcySS6GzxofbSqN4IfBjuMRgdPAC5JGYE89NA/9APOAM79JyJxR z+KlC3lTtKqACEFx2Z6NizJllPvSBFudgVqvucIHcMMZRXSlASNPQPtH6GyQQzNT4MPkq6F2MYN /mQqmAj4RLM49tmCEo02JsujphgQx4YKSrgIGoh1atNprQkL+23g875XhKnXeCrs87JPQBOBwqA a7EYDjVzsPFhAP1XLXV6SmVxHdzVE83LBAO7U4pv+MBbCwb46TmZmQ8ZxjGMbo5jvkXSS4IP0Wh ytN961gLTvB+uL0xGlMfbMPRynO1FGXLci5YtWlzgYw0BpcVHnwnQo5C+pB2+RGco8g2hRucDJG nlkbBx4fCMtBetnB8eD2Z/Q3vpCXE271bj2oT8wFYxYzHQeg5NGw01Gq48Af7DMim5CqoycKI3A YxIH8WjWqyjE2Hxh923ONeNq90b2SatuTH+hN4p1ZXe7LJjjYImHm8qaGZCgU15DtcMgyzDqX1y 0Hpbm4gKcucMbUw== 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. Add the camera sensor properties for both. To my knowledge, all Starvis 2 sensors have the same black level and gain models. So for the camera helper, combine the existing helpers for other sensors from the same family (IMX662, IMX678) and use it for IMX585 and IMX676 too. 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, 24 insertions(+), 15 deletions(-) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 5fbeefaf5e90..d8a9fe63417c 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -658,29 +658,18 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx477, "imx477") -class CameraSensorHelperImx662 : public CameraSensorHelper +class CameraSensorHelperStarvis2: public CameraSensorHelper { public: - CameraSensorHelperImx662() - { - /* From datasheet: 0xc8 at 12bits. */ - blackLevel_ = 3200; - gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; - } -}; -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx662, "imx662") - -class CameraSensorHelperImx678 : public CameraSensorHelper -{ -public: - CameraSensorHelperImx678() + CameraSensorHelperStarvis2() { /* From datasheet: 0x32 at 10bits. */ blackLevel_ = 3200; gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; } }; -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx678, "imx678") +REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperStarvis2, "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 = {},