[v2,3/3] ipa: rpi: cam-helper: Support IMX585 and IMX676
diff mbox series

Message ID 20261022-mainline-imx676-v2-3-0b839f1001c0@ideasonboard.com
State New
Headers show
Series
  • libcamera: sensor: Add support for Sony IMX585 and IMX676
Related show

Commit Message

Jai Luthra Oct. 22, 2026, 3:48 p.m. UTC
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 <kieran.bingham@ideasonboard.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
---
 src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

Patch
diff mbox series

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);