[v3,1/9] libcamera: mali-c55: Limit max size to sensor resolution
diff mbox series

Message ID 20240626140309.50052-2-jacopo.mondi@ideasonboard.com
State Superseded
Headers show
Series
  • Miscellaneous Mali-C55 Pipeline Fixes
Related show

Commit Message

Jacopo Mondi June 26, 2024, 2:02 p.m. UTC
The Mali C55 ISP cannot upscale. The maximum allowed output size
is the sensor's resolution.

For RAW streams this is already handled in adjustRawSizes(), while
for processed streams the maximum allowed resolution was wrongly
set to the ISP maximum output size (8192x8192).

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/pipeline/mali-c55/mali-c55.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Umang Jain June 29, 2024, 6:31 a.m. UTC | #1
Hi Jacopo

Thank you for the patch

On 26/06/24 7:32 pm, Jacopo Mondi wrote:
> The Mali C55 ISP cannot upscale. The maximum allowed output size
> is the sensor's resolution.
>
> For RAW streams this is already handled in adjustRawSizes(), while
> for processed streams the maximum allowed resolution was wrongly
> set to the ISP maximum output size (8192x8192).
>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>   src/libcamera/pipeline/mali-c55/mali-c55.cpp | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> index 45c71c1dd619..1c1fef2337f0 100644
> --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> @@ -342,7 +342,11 @@ CameraConfiguration::Status MaliC55CameraConfiguration::validate()
>   		rawConfig = &config;
>   	}
>   
> -	Size maxSize = kMaliC55MaxSize;
> +	/*
> +	 * The C55 can not upscale. Limit the configuration to the ISP
> +	 * capabilities and the sensor resolution.
> +	 */
> +	Size maxSize = kMaliC55MaxSize.boundedTo(data_->resolution());
>   	if (rawConfig) {
>   		/*
>   		 * \todo Take into account the Bayer components ordering once

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
index 45c71c1dd619..1c1fef2337f0 100644
--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
@@ -342,7 +342,11 @@  CameraConfiguration::Status MaliC55CameraConfiguration::validate()
 		rawConfig = &config;
 	}
 
-	Size maxSize = kMaliC55MaxSize;
+	/*
+	 * The C55 can not upscale. Limit the configuration to the ISP
+	 * capabilities and the sensor resolution.
+	 */
+	Size maxSize = kMaliC55MaxSize.boundedTo(data_->resolution());
 	if (rawConfig) {
 		/*
 		 * \todo Take into account the Bayer components ordering once