From patchwork Thu Nov 5 13:07:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 28776 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 9D56CC3307 for ; Thu, 5 Nov 2026 13:09:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 57F476A7B1; Thu, 5 Nov 2026 14:09:21 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="leOdNHO0"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 163986A7B1 for ; Thu, 5 Nov 2026 14:09:20 +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 1D6E75E; Thu, 5 Nov 2026 14:07:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1793884021; bh=2S4oh/TlVfzCzIuoOUQoJ9fDWSO7nWbQVNoSnLpl6IY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=leOdNHO08PiP4DX69ClAUKrfhw0RlxuMZ0XP77kREk879TiJ9NRghSCui201bY7Hq hV9rI1+9SYTcnlqTtXorvnfPEkf3rRf6uYgoD7kbpcl9m6REK9ovmleN09GtfK5gIk aMPpiIVZq7/SxC7rAyOVE0khlf2i7Z/WhvP93yTM= From: Jai Luthra Date: Thu, 05 Nov 2026 18:37:51 +0530 Subject: [PATCH v3 4/4] ipa: rpi: cam-helper: Support IMX585 and IMX676 MIME-Version: 1.0 Message-Id: <20261105-mainline-imx676-v3-4-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=2153; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=2S4oh/TlVfzCzIuoOUQoJ9fDWSO7nWbQVNoSnLpl6IY=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBq7H/jtf8MIQws2amrNs26nnCC7vryY1xh7AUcG ZlpRSxEpHuJAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCaux/4wAKCRBD3pH5JJpx RUZNEACLWWHev0E4+FlQGp2BrwmtCiHtRyanWz/8Qq5R7sQ+U3e7DHbftq/P7m75J2SWULGf296 2Wu0ww5xVX5BIquyoLEAmGkQtZwWyUXgN6BxIgwOOG7GwQQFr+C37KlgdnOqasxxETFK6u2YM4X 8n93GmqjcLji8tkBiQZKtYWRKgkvOB1uIGs3ExRK0f/Dxg5xI/7oalgqaNFRuCN3rUDTEpJrH0J ++1sT3hpV9rSLtwGhE+syVs+p1mZpaFHLc62eI/zWNPN27zm1c7BvNQH+TulcL8zN2+rA0YdHhf bG7TCxhbWkN7rCBh9nM3G+TKaI/t6/Tt18/dKgrr6mbhNGmU0FOYWMSJQYx4G+e/vWEB8evSYTP IHemCos0Ey5u6AWPOFrALFefSMr1lXDdIqu1NJhK4gF+lHgTmRB1PCbmq44PFzDBwPAz4PYAx08 UnjRaOoCrzIa0lI6dPZfEx/DgWI377JWBu7iaEcWGxZLRH99CUW7rLi4Yl20Ydh9EePvpnY9kqo 4XuwHddQZ0bsav3kssE19fU+/lJgAI2wLoFq5Nwbv92ed4F1daIk3KTULeiD9OxWE9Dtu29vOg6 Y0zeiYQJIZUJrjUzSDlbDbsELIM3F9LL79RrfcH2lEdeCMP5ulbZpWQTeOzk2akIxftMTWmOijv N6nyGYkLZBYFpsA== 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 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);