[libcamera-devel,v5,18/19] libcamera: ipu3: Limit resolution to 2560x1920

Message ID 20190326083902.26121-19-jacopo@jmondi.org
State Superseded
Headers show
Series
  • libcamera: ipu3: Add ImgU support
Related show

Commit Message

Jacopo Mondi March 26, 2019, 8:39 a.m. UTC
As the procedure to configure the intermediate sizes and the alignement
requirements of the ImgU device have not been clarified yet, return as
default configuration the (2560x1920) resolution that has been validated
for both cameras.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Comments

Laurent Pinchart April 2, 2019, 10:55 a.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Tue, Mar 26, 2019 at 09:39:01AM +0100, Jacopo Mondi wrote:
> As the procedure to configure the intermediate sizes and the alignement
> requirements of the ImgU device have not been clarified yet, return as
> default configuration the (2560x1920) resolution that has been validated
> for both cameras.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

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

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 7b7baa5ac5fb..66efcc37d695 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -248,11 +248,17 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera,
>  	std::map<Stream *, StreamConfiguration> configs;
>  	IPU3CameraData *data = cameraData(camera);
>  	StreamConfiguration *config = &configs[&data->stream_];
> -	CIO2Device *cio2 = &data->cio2_;
> -	SizeRange &maxRange = cio2->maxSizes_.second;
>  
> -	config->width = maxRange.maxWidth;
> -	config->height = maxRange.maxHeight;
> +	/*
> +	 * FIXME: Soraka: the maximum resolution reported by both sensors
> +	 * (2592x1944 for ov5670 and 4224x3136 for ov13858) are returned as
> +	 * default configurations but they're not correctly processed by the
> +	 * ImgU. Resolutions up tp 2560x1920 have been validated.
> +	 *
> +	 * \todo Clarify ImgU alignement requirements.
> +	 */
> +	config->width = 2560;
> +	config->height = 1920;
>  	config->pixelFormat = V4L2_PIX_FMT_NV12;
>  	config->bufferCount = IPU3_BUFFER_COUNT;
>
Niklas Söderlund April 2, 2019, 11:41 a.m. UTC | #2
Hi Jacopo,

Thanks for your work.

On 2019-03-26 09:39:01 +0100, Jacopo Mondi wrote:
> As the procedure to configure the intermediate sizes and the alignement
> requirements of the ImgU device have not been clarified yet, return as
> default configuration the (2560x1920) resolution that has been validated
> for both cameras.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 7b7baa5ac5fb..66efcc37d695 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -248,11 +248,17 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera,
>  	std::map<Stream *, StreamConfiguration> configs;
>  	IPU3CameraData *data = cameraData(camera);
>  	StreamConfiguration *config = &configs[&data->stream_];
> -	CIO2Device *cio2 = &data->cio2_;
> -	SizeRange &maxRange = cio2->maxSizes_.second;
>  
> -	config->width = maxRange.maxWidth;
> -	config->height = maxRange.maxHeight;
> +	/*
> +	 * FIXME: Soraka: the maximum resolution reported by both sensors
> +	 * (2592x1944 for ov5670 and 4224x3136 for ov13858) are returned as
> +	 * default configurations but they're not correctly processed by the
> +	 * ImgU. Resolutions up tp 2560x1920 have been validated.
> +	 *
> +	 * \todo Clarify ImgU alignement requirements.
> +	 */
> +	config->width = 2560;
> +	config->height = 1920;
>  	config->pixelFormat = V4L2_PIX_FMT_NV12;
>  	config->bufferCount = IPU3_BUFFER_COUNT;
>  
> -- 
> 2.21.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 7b7baa5ac5fb..66efcc37d695 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -248,11 +248,17 @@  PipelineHandlerIPU3::streamConfiguration(Camera *camera,
 	std::map<Stream *, StreamConfiguration> configs;
 	IPU3CameraData *data = cameraData(camera);
 	StreamConfiguration *config = &configs[&data->stream_];
-	CIO2Device *cio2 = &data->cio2_;
-	SizeRange &maxRange = cio2->maxSizes_.second;
 
-	config->width = maxRange.maxWidth;
-	config->height = maxRange.maxHeight;
+	/*
+	 * FIXME: Soraka: the maximum resolution reported by both sensors
+	 * (2592x1944 for ov5670 and 4224x3136 for ov13858) are returned as
+	 * default configurations but they're not correctly processed by the
+	 * ImgU. Resolutions up tp 2560x1920 have been validated.
+	 *
+	 * \todo Clarify ImgU alignement requirements.
+	 */
+	config->width = 2560;
+	config->height = 1920;
 	config->pixelFormat = V4L2_PIX_FMT_NV12;
 	config->bufferCount = IPU3_BUFFER_COUNT;