[libcamera-devel] libcamera: CameraSensorProperties: Add test pattern mode of imx258
diff mbox series

Message ID 20210614122215.510562-1-hiroh@chromium.org
State Accepted
Headers show
Series
  • [libcamera-devel] libcamera: CameraSensorProperties: Add test pattern mode of imx258
Related show

Commit Message

Hirokazu Honda June 14, 2021, 12:22 p.m. UTC
Add supported test pattern modes of imx258 in CameraSensorProperties.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
---
 src/libcamera/camera_sensor_properties.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart June 14, 2021, 10:28 p.m. UTC | #1
Hi Hiro,

Thank you for the patch.

On Mon, Jun 14, 2021 at 09:22:15PM +0900, Hirokazu Honda wrote:
> Add supported test pattern modes of imx258 in CameraSensorProperties.

Based on the V4L2 driver, this looks correct. I don't have access to the
datasheet, so I can't perform further checks.

> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
> ---
>  src/libcamera/camera_sensor_properties.cpp | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
> index f660743a..afa59b82 100644
> --- a/src/libcamera/camera_sensor_properties.cpp
> +++ b/src/libcamera/camera_sensor_properties.cpp
> @@ -65,7 +65,13 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>  		{ "imx258", {
>  			.unitCellSize = { 1120, 1120 },
>  			/* \todo fill test pattern modes for imx258. */

This should be dropped.

> -			.testPatternModes = {},
> +			.testPatternModes = {
> +				{0, controls::draft::TestPatternModeOff },
> +				{1, controls::draft::TestPatternModeSolidColor},
> +				{2, controls::draft::TestPatternModeColorBars},
> +				{3, controls::draft::TestPatternModeColorBarsFadeToGray},
> +				{4, controls::draft::TestPatternModePn9},

Missing spaces after { and before }.

I'll fix this when applying.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

Patch
diff mbox series

diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
index f660743a..afa59b82 100644
--- a/src/libcamera/camera_sensor_properties.cpp
+++ b/src/libcamera/camera_sensor_properties.cpp
@@ -65,7 +65,13 @@  const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
 		{ "imx258", {
 			.unitCellSize = { 1120, 1120 },
 			/* \todo fill test pattern modes for imx258. */
-			.testPatternModes = {},
+			.testPatternModes = {
+				{0, controls::draft::TestPatternModeOff },
+				{1, controls::draft::TestPatternModeSolidColor},
+				{2, controls::draft::TestPatternModeColorBars},
+				{3, controls::draft::TestPatternModeColorBarsFadeToGray},
+				{4, controls::draft::TestPatternModePn9},
+			},
 		} },
 		{ "ov5670", {
 			.unitCellSize = { 1120, 1120 },