[v3,9/9] libcamera: mali-c55: Propagate CSI-2 format to ISP
diff mbox series

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

Commit Message

Jacopo Mondi June 26, 2024, 2:03 p.m. UTC
The latest version of the Mali C55 driver has changed the format
accepted by the ISP sink pad to be the 20-bit wide.

The CSI-2 receiver handles the format expansion internally by
propagating the sensor produced format from its sink to the 20-bit
expanded version on its source pad.

Instead of re-applying the sensor format to the CSI-2 receiver source
pad (which is now an invalid operation) read from there the format
propagated by the driver internally and further propagate it to the ISP
subdevice.

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

---
Latest version of the Mali C55 support
https://lore.kernel.org/linux-media/20240529152858.183799-1-dan.scally@ideasonboard.com/
---
 src/libcamera/pipeline/mali-c55/mali-c55.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Umang Jain June 29, 2024, 7:02 a.m. UTC | #1
HiĀ  Jacopo,

Thank you for the patch

On 26/06/24 7:33 pm, Jacopo Mondi wrote:
> The latest version of the Mali C55 driver has changed the format
> accepted by the ISP sink pad to be the 20-bit wide.
>
> The CSI-2 receiver handles the format expansion internally by
> propagating the sensor produced format from its sink to the 20-bit
> expanded version on its source pad.
>
> Instead of re-applying the sensor format to the CSI-2 receiver source
> pad (which is now an invalid operation) read from there the format
> propagated by the driver internally and further propagate it to the ISP
> subdevice.
>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

LGTM as per the commit message explanation,

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
>
> ---
> Latest version of the Mali C55 support
> https://lore.kernel.org/linux-media/20240529152858.183799-1-dan.scally@ideasonboard.com/
> ---
>   src/libcamera/pipeline/mali-c55/mali-c55.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> index 28ad0172658c..156560c1d9bf 100644
> --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> @@ -768,7 +768,7 @@ int PipelineHandlerMaliC55::configure(Camera *camera,
>   		if (ret)
>   			return ret;
>   
> -		ret = data->csi_->setFormat(1, &subdevFormat);
> +		ret = data->csi_->getFormat(1, &subdevFormat);
>   		if (ret)
>   			return ret;
>   	}
Dan Scally July 8, 2024, 11:07 a.m. UTC | #2
Hi Jacopo - thanks for the patch

On 26/06/2024 15:03, Jacopo Mondi wrote:
> The latest version of the Mali C55 driver has changed the format
> accepted by the ISP sink pad to be the 20-bit wide.
>
> The CSI-2 receiver handles the format expansion internally by
> propagating the sensor produced format from its sink to the 20-bit
> expanded version on its source pad.
>
> Instead of re-applying the sensor format to the CSI-2 receiver source
> pad (which is now an invalid operation) read from there the format
> propagated by the driver internally and further propagate it to the ISP
> subdevice.
>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
> ---
> Latest version of the Mali C55 support
> https://lore.kernel.org/linux-media/20240529152858.183799-1-dan.scally@ideasonboard.com/
> ---
>   src/libcamera/pipeline/mali-c55/mali-c55.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> index 28ad0172658c..156560c1d9bf 100644
> --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
> @@ -768,7 +768,7 @@ int PipelineHandlerMaliC55::configure(Camera *camera,
>   		if (ret)
>   			return ret;
>   
> -		ret = data->csi_->setFormat(1, &subdevFormat);
> +		ret = data->csi_->getFormat(1, &subdevFormat);
>   		if (ret)
>   			return ret;
>   	}

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 28ad0172658c..156560c1d9bf 100644
--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
@@ -768,7 +768,7 @@  int PipelineHandlerMaliC55::configure(Camera *camera,
 		if (ret)
 			return ret;
 
-		ret = data->csi_->setFormat(1, &subdevFormat);
+		ret = data->csi_->getFormat(1, &subdevFormat);
 		if (ret)
 			return ret;
 	}