[PATCH 1/4] libcamera: libipa: camera_sensor: Add Sony IMX462 sensor properties

Geoffrey Van Landeghem geoffrey.vl at gmail.com
Wed Nov 13 23:35:54 CET 2024


Hi,
This patch-set comes as part of an ongoing effort to support Sony IMX327 and IMX462 sensors better in the linux kernel.
For the kernel following changes are proposed:
https://github.com/raspberrypi/linux/pull/5859

After those changes have been applied, the 2 Starvis sensors will no longer be identied by libcamera as a IMX290 and therefore require this patch-set to work correctly. 

Signed-off-by: Geoffrey Van Landeghem <geoffrey.vl at gmail.com>
---
 src/ipa/libipa/camera_sensor_helper.cpp           | 5 +++++
 src/ipa/rpi/cam_helper/cam_helper_imx290.cpp      | 1 +
 src/libcamera/sensor/camera_sensor_properties.cpp | 4 ++++
 3 files changed, 10 insertions(+)

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index c6169bdc..f870dc28 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -622,6 +622,11 @@ public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("imx415", CameraSensorHelperImx415)
 
+class CameraSensorHelperImx462 : public CameraSensorHelperImx290
+{
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx462", CameraSensorHelperImx462)
+
 class CameraSensorHelperImx477 : public CameraSensorHelper
 {
 public:
diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
index e57ab538..0cc24a6d 100644
--- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
+++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
@@ -73,3 +73,4 @@ static CamHelper *create()
 }
 
 static RegisterCamHelper reg("imx290", &create);
+static RegisterCamHelper reg462("imx462", &create);
diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
index 6d4136d0..e2305166 100644
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -142,6 +142,10 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
 			.unitCellSize = { 1450, 1450 },
 			.testPatternModes = {},
 		} },
+		{ "imx462", {
+			.unitCellSize = { 2900, 2900 },
+			.testPatternModes = {},
+		} },
 		{ "imx477", {
 			.unitCellSize = { 1550, 1550 },
 			.testPatternModes = {},
-- 
2.43.0



More information about the libcamera-devel mailing list