[v4,2/2] libcamera: camera_sensor_properties: Add imx471
diff mbox series

Message ID CALr1FG_aw7EMOfHp+wE2nNrf6BncVCmqX5yvz=oq4vP-FASUHA@mail.gmail.com
State New
Headers show
Series
  • Add imx471 soft-ISP sensor support
Related show

Commit Message

John Cronin July 31, 2026, 3:15 p.m. UTC
Register static properties for Sony IMX471 so soft-ISP no longer warns
about missing sensor properties.

Unit cell size is ~1.4 µm (kernel active array 4656x3496). Test pattern
modes match imx471_test_pattern_menu[] in drivers/media/i2c/imx471.c.
Sensor control delays are left empty so libcamera uses its defaults
until measured.

Signed-off-by: John Cronin <john.cronin@opcenter.com>
---
 src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

 			.testPatternModes = {},

Comments

Jacopo Mondi July 31, 2026, 3:37 p.m. UTC | #1
Hi John

On Fri, Jul 31, 2026 at 08:15:35AM -0700, John Cronin wrote:
> Register static properties for Sony IMX471 so soft-ISP no longer warns
> about missing sensor properties.
>
> Unit cell size is ~1.4 µm (kernel active array 4656x3496). Test pattern
> modes match imx471_test_pattern_menu[] in drivers/media/i2c/imx471.c.
> Sensor control delays are left empty so libcamera uses its defaults
> until measured.
>
> Signed-off-by: John Cronin <john.cronin@opcenter.com>
> ---
>  src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp
> b/src/libcamera/sensor/camera_sensor_properties.cpp
> index fc9e184..4823462 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -297,6 +297,20 @@ const CameraSensorProperties
> *CameraSensorProperties::get(const std::string &sen
>  				.hblankDelay = 2
>  			},
>  		} },
> +		{ "imx471", {
> +			/* ~1.4 µm pixels (nm); active array 4656x3496 in kernel. */
> +			.unitCellSize = { 1400, 1400 },
> +			/* Matches imx471_test_pattern_menu[] in drivers/media/i2c/imx471.c */

eheh no need to re-state it. I can drop the comment when applying the
patch.

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeSolidColor, 1 },
> +				{ controls::draft::TestPatternModeColorBars, 2 },
> +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> +				{ controls::draft::TestPatternModePn9, 4 },
> +			},
> +			/* Control delays not measured; use libcamera defaults. */
> +			.sensorDelays = { },
> +		} },
>  		{ "imx477", {
>  			.unitCellSize = { 1550, 1550 },
>  			.testPatternModes = {},
> --
> 2.55.0
John Cronin July 31, 2026, 3:44 p.m. UTC | #2
Hi Jacopo,

Thanks for the R-b. Please drop the test-pattern comment when applying
as you suggested.

John

Patch
diff mbox series

diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp
b/src/libcamera/sensor/camera_sensor_properties.cpp
index fc9e184..4823462 100644
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -297,6 +297,20 @@  const CameraSensorProperties
*CameraSensorProperties::get(const std::string &sen
 				.hblankDelay = 2
 			},
 		} },
+		{ "imx471", {
+			/* ~1.4 µm pixels (nm); active array 4656x3496 in kernel. */
+			.unitCellSize = { 1400, 1400 },
+			/* Matches imx471_test_pattern_menu[] in drivers/media/i2c/imx471.c */
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeSolidColor, 1 },
+				{ controls::draft::TestPatternModeColorBars, 2 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
+				{ controls::draft::TestPatternModePn9, 4 },
+			},
+			/* Control delays not measured; use libcamera defaults. */
+			.sensorDelays = { },
+		} },
 		{ "imx477", {
 			.unitCellSize = { 1550, 1550 },