From patchwork Wed Nov 18 08:08:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 28961 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 DCE0ABDE17 for ; Wed, 18 Nov 2026 08:09:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 90D9D6A8AD; Wed, 18 Nov 2026 09:09:38 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="aGsmfapQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9CFFA6A89F for ; Wed, 18 Nov 2026 09:09:37 +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 35E3D4F1; Wed, 18 Nov 2026 09:07:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1794989229; bh=H4T9IBgsjt68V2J8s3/eJo8blOsfn1GM9M63JEz8m7o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aGsmfapQTx1isoyir0TqrSGtYQpX9qpvSGWwsD3APoyBwaEQU6Xmd7umcUIf5tG0l wKq1ckBQZfbdYff/5/yLZPeqBimkh1xtO3yT6ti5zOccgf/ATduh/MSelRDDww/oIQ bJyTfDgO7thohv0EPv1kAsuHxi6GAwNJA/s7ABtI= From: Jai Luthra Date: Wed, 18 Nov 2026 13:38:28 +0530 Subject: [PATCH v4 4/4] ipa: rpi: cam-helper: Support IMX585 and IMX676 MIME-Version: 1.0 Message-Id: <20261118-mainline-imx676-v4-4-48ae007f11b4@ideasonboard.com> References: <20261118-mainline-imx676-v4-0-48ae007f11b4@ideasonboard.com> In-Reply-To: <20261118-mainline-imx676-v4-0-48ae007f11b4@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=2206; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=H4T9IBgsjt68V2J8s3/eJo8blOsfn1GM9M63JEz8m7o=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBq/V0n5C5PBYu0KOQFSeFxJ4yc+/3rYbRnOnC3r nYPE9FlnLqJAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCav1dJwAKCRBD3pH5JJpx RVoGEACwcO9AwrzVgqYxPuu8c3n3venoW9EFza254hvsDVm/5C06P//7l5aC2WnrrVRm4Io7WlY 9OhXeliqNoy1dclNJuW82jioCm32V+/yCyqS4FkjkL4NKNi2rS09TuhPVOSHUVAe/30i99G30oV TufXB22/7A8R9C7ZNAM6kw7pXO/DNl10JHivWwrP6ROuxkARNB4vH4+jJslnLJM/8x3b7CI0T/x 2LzFVw+k2TWcyZ19ujmakyCmin+tFSGHPl/gy6aaSDqxcsqbc8C2mqnsIwpwCGBXSAqprddfNGg 1QUw5FHL2+OfjeZUR0Em4NekKGOFc1orqfgS/VTFoQhPECPKg3Hh8LZ9BxYTAtRSHnnDnBki3mH eE0qo3w0OK4kWUps9G0YZeYWQqYTprT83tAhRUJhRt1ESy657FbN6SkUhMwxGQ0EbQII/+xDhar bVv786w+Ei1LduMQxN7USuVxLpbgwr0/dM4X2D53OPZEVyB/mm0gLGfQlqts76cYpwtDZvYSE3Y Fi5HqN3uYNGKny4aev8aSDM8KISpD7JUwX251JWsQmoakMuYgr4Qvc6yKidf2u91h52HpDn7AN0 AFNoDIltBPnkxpu8J2xr5In3zwoGGOpNy2rotT5mwnzBgPFH+OHBCreG+hhegypi866JJ+MuIBN dCh41Cc+ZLqMuog== 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 and IMX676 are also Starvis 2 sensors, with same gain model as rest of them. The integration time constraints are different, as the SRM specifies the shutter reigster minimum to be 8 (in units of 2H) as opposed to 4 (in units of 1H). Add support for both through the existing Starvis 2 helper, handling the integration time explicitly during registration. Reviewed-by: Kieran Bingham Reviewed-by: Naushir Patuck Signed-off-by: Jai Luthra --- src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp b/src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp index a2f01bbc8370..07e77b939ec2 100644 --- a/src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp +++ b/src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp @@ -17,7 +17,7 @@ using namespace RPiController; class CamHelperStarvis2 : public CamHelper { public: - CamHelperStarvis2(); + CamHelperStarvis2(unsigned int frameIntegrationDiff = kFrameIntegrationDiff); uint32_t gainCode(double gain) const override; double gain(uint32_t gainCode) const override; @@ -26,10 +26,10 @@ private: * Smallest difference between the frame length and integration time, * in units of lines. */ - static constexpr int frameIntegrationDiff = 4; + static constexpr unsigned int kFrameIntegrationDiff = 4; }; -CamHelperStarvis2::CamHelperStarvis2() +CamHelperStarvis2::CamHelperStarvis2(unsigned int frameIntegrationDiff) : CamHelper({}, frameIntegrationDiff) { } @@ -50,8 +50,16 @@ CamHelper *create() return new CamHelperStarvis2(); } +CamHelper *create585() +{ + /* IMX585 and IMX676 manuals specify the minimum for SHR0 as 8 lines */ + return new CamHelperStarvis2(8); +} + +RegisterCamHelper reg585("imx585", &create585); RegisterCamHelper reg662("imx662", &create); RegisterCamHelper reg675("imx675", &create); +RegisterCamHelper reg676("imx676", &create585); RegisterCamHelper reg678("imx678", &create); RegisterCamHelper reg832("imx832", &create);