From patchwork Thu Oct 22 15:48:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 28560 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 6DC0CC324C for ; Thu, 22 Oct 2026 15:49:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0F9D568F86; Thu, 22 Oct 2026 17:49:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="U3k45atQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3364468F6E for ; Thu, 22 Oct 2026 17:49:05 +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 8941A8FD; Thu, 22 Oct 2026 17:46:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1792684017; bh=HhcrD+vqQ1/ePZsavJkcir1wVWvtLI50mwwFLdEVJBs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=U3k45atQ/JBr7EhFUWu+nUX1y88AeywzNCeJCPhHqGZkVB9XfudhI9qX5k5s63ibM wSSnUdrwVtLTPHe2h3Iy8XetRLd3aGriuvWfwSg5R4OYoFW8LDfGKa2YInH2lGvTXh Gr9+Otbpr00kGI00N++HGtR+Y6uhG7BTjmtEPK+o= From: Jai Luthra Date: Thu, 22 Oct 2026 21:18:32 +0530 Subject: [PATCH v2 3/3] ipa: rpi: cam-helper: Support IMX585 and IMX676 MIME-Version: 1.0 Message-Id: <20261022-mainline-imx676-v2-3-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=2153; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=HhcrD+vqQ1/ePZsavJkcir1wVWvtLI50mwwFLdEVJBs=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBq2jBbAMYKqufO1iNb916boAN2DnMzvypDBIfuy PVCeqaKpDeJAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCatowWwAKCRBD3pH5JJpx RSsDD/9MydgtUBmbGeEUSnBzCZkOlT1dof69sZ9UoQlUofErH7CUMTDxKOir0tde+b52o5osjD+ 0aeF7t0h5c1muZ4j6jziedd1L4oBZyB/iaP26Nrk76QQqPOwHFJTuhorzuOiMiZKUD7ZMm3Ok6M 04+a/zLieeFwtpxsp+7wi51+eE4ehaon99W7UPtXfVSuhX/hXsF9pmQn/MjDaJQUoEKN88AhT4J rasCxJqiyiRB05+X97p26X7nxS/1GzFB7q52mHovURZOTdDKL4hbV+PNmiRVRUmNATwSijMFfSm apxpVCe/7LJqeS4yrYrQ3IOgCy1IFI8Is1Jk8fqcbTzkSM4SUPa2GySNrATrZA4KwjNyxnLafUF P9LTYtjPlF95PcGckq0T+54o61k7hO3qqJHOdeNIwv86dXATW9NrVl/dASFP++Oqjj35mgC4iDu KtGlkAbCpuEVmpoMiToaPx5g+FXjimHyyW9fdwkM7qZjayxvuXHI3XISiSe7zx5YQ0UPkA9OHW7 NfvnF7iyMSW+QqXlkOg4qe1hcJZT77Izoj7mk8B59FaFE1sroTmZ+4GW4KKSygnM02vMD6pvutd yH+pvl9MHvQD4gYsG3y5sUXZxvYvh/NH/nAXRJ+y8mgjaqTUm9hjnlXnlJTbBzPnDxBGIB4LTvn A5VoyBbVzzRX9sw== 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);