[libcamera-devel] ipu3: Disallow raw only camera configuration
diff mbox series

Message ID 20210804112603.152493-1-umang.jain@ideasonboard.com
State Superseded
Headers show
Series
  • [libcamera-devel] ipu3: Disallow raw only camera configuration
Related show

Commit Message

Umang Jain Aug. 4, 2021, 11:26 a.m. UTC
Ideally to capture the raw frames, ImgU should not be required.
However, we do need to configure the IPA since, it shall setup
the sensor controls (exposure, vblank and so on) for the capture.
One cannot simply configure the IPA, without the ImgU as the
parameters and statistics buffer passed to the IPA are actually
managed by the ImgU.

Until we prepare and setup the ImgU to run an internal queue for
raw-only camera configuration, disallow this configuration and
report it as invalid.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Laurent Pinchart Aug. 4, 2021, 12:40 p.m. UTC | #1
Hi Umang,

Thank you for the patch.

On Wed, Aug 04, 2021 at 04:56:03PM +0530, Umang Jain wrote:
> Ideally to capture the raw frames, ImgU should not be required.
> However, we do need to configure the IPA since, it shall setup

s/since,/since/

> the sensor controls (exposure, vblank and so on) for the capture.
> One cannot simply configure the IPA, without the ImgU as the
> parameters and statistics buffer passed to the IPA are actually
> managed by the ImgU.
> 
> Until we prepare and setup the ImgU to run an internal queue for
> raw-only camera configuration, disallow this configuration and
> report it as invalid.
> 
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 76c3bb3d..3e159279 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -248,6 +248,10 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()
>  	if (rawCount > 1 || yuvCount > 2) {
>  		LOG(IPU3, Debug) << "Camera configuration not supported";
>  		return Invalid;
> +	} else if (rawCount && !yuvCount) {

This needs a \todo comment. Apart from that, I think it's fine.

> +		LOG(IPU3, Debug)
> +			<< "Camera configuration cannot support raw-only streams";
> +		return Invalid;
>  	}
>  
>  	/*

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 76c3bb3d..3e159279 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -248,6 +248,10 @@  CameraConfiguration::Status IPU3CameraConfiguration::validate()
 	if (rawCount > 1 || yuvCount > 2) {
 		LOG(IPU3, Debug) << "Camera configuration not supported";
 		return Invalid;
+	} else if (rawCount && !yuvCount) {
+		LOG(IPU3, Debug)
+			<< "Camera configuration cannot support raw-only streams";
+		return Invalid;
 	}
 
 	/*