[RFC,v3] libipa: camera_sensor_helper: Add imx708
diff mbox series

Message ID 20251028093720.383810-1-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [RFC,v3] libipa: camera_sensor_helper: Add imx708
Related show

Commit Message

Barnabás Pőcze Oct. 28, 2025, 9:37 a.m. UTC
From: Daniel Scally <dan.scally@ideasonboard.com>

The imx708 sensor driver has long been available, especially in raspberry
pi kernels; and the raspberry pi ipa module has had the corresponding
helper class since 2023 (952ef94ed78d71). The camera sensor properties
database also has an entry for it (2fb0f250196326), but the camera sensor
helper class is missing from the common libipa component. So add it, with
the same gain formula present in the raspberry pi ipa module, and the black
level taken from the rpi tuning files.

Handling the raspberry pi specific "wide" / "noir" suffixes is omitted.
They are not present in the camera sensor properties database either.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
[Add black level, extend commit message.]
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
changes in v3:
  * add black level as well

changes in v2:
  * drop rpi specific suffixes

v2: https://patchwork.libcamera.org/patch/24765/
v1: https://patchwork.libcamera.org/patch/24708/
---
 src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

--
2.51.1

Patch
diff mbox series

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index ef3bd0d621..e3e3e53554 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -642,6 +642,17 @@  public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477)

+class CameraSensorHelperImx708 : public CameraSensorHelper
+{
+public:
+	CameraSensorHelperImx708()
+	{
+		blackLevel_ = 4096;
+		gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 };
+	}
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708)
+
 class CameraSensorHelperOv2685 : public CameraSensorHelper
 {
 public: