[PATCH 1/1] libcamera: Add camera sensor properties for ciri

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Sep 23 10:47:49 CEST 2024


Hi Harvey and Han-Lin,

Thank you for the patch.

On Mon, Sep 23, 2024 at 07:09:56AM +0000, Harvey Yang wrote:
> From: Han-Lin Chen <hanlinchen at chromium.org>
> 
> ciri has sensors: hi1339, gc08a3, and gc05a2.
> 
> Signed-off-by: Han-Lin Chen <hanlinchen at chromium.org>
> Co-developed-by: Xing Gu <xinggu at chromium.org>
> Co-developed-by: Yudhistira Erlandinata <yerlandinata at chromium.org>
> Co-developed-by: Harvey Yang <chenghaoyang at chromium.org>
> ---
>  .../sensor/camera_sensor_properties.cpp       | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> index 4e5217ab..a224f8d2 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -276,6 +276,27 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>  				{ controls::draft::TestPatternModeColorBars, 1 },
>  			},
>  		} },
> +		{ "hi1339", {
> +			.unitCellSize = { 1120, 1120 },
> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeColorBars, 2 },
> +			},
> +		} },

Unless I'm mistaken, the driver for this sensor hasn't been posted to
the linux-media mailing list. The policy in libcamera is that drivers
need to be on their way to upstream. You could split this patch in two
to merge support for the gc08a3 and gc05a2 already, and address the
hi1339 when the driver gets posted.

> +		{ "gc08a3", {
> +			.unitCellSize = { 1120, 1120 },
> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeColorBars, 2 },
> +			},
> +		} },

Sensor support also requires adding a sensor helper in
src/ipa/libipa/camera_sensor_helper.cpp.

> +		{ "gc05a2", {
> +			.unitCellSize = { 1120, 1120 },

Do those three sensors really have a pixel size of 1.12µm, or was that
by any chance copied from the previous entry in the table ?

> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeColorBars, 1 },
> +			},
> +		} },

Please sort entries alphabetically.

>  	};
>  
>  	const auto it = sensorProps.find(sensor);

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list