[libcamera-devel,v2,1/5] libcamera: pipeline: simple: Improve debug message on config failure
diff mbox series

Message ID 20220612152311.8408-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: pipeline: simple: Support scaling on the camea sensor
Related show

Commit Message

Laurent Pinchart June 12, 2022, 3:23 p.m. UTC
When pipeline configuration fails, print the format returned by the
kernel in addition to the one requested by libcamera, to ease debugging.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kieran Bingham June 15, 2022, 10:57 p.m. UTC | #1
Quoting Laurent Pinchart via libcamera-devel (2022-06-12 16:23:07)
> When pipeline configuration fails, print the format returned by the
> kernel in addition to the one requested by libcamera, to ease debugging.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/pipeline/simple/simple.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index de75465eb3b5..efb28ccd97e8 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -939,7 +939,8 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
>             captureFormat.size != pipeConfig->captureSize) {
>                 LOG(SimplePipeline, Error)
>                         << "Unable to configure capture in "
> -                       << pipeConfig->captureSize << "-" << videoFormat;
> +                       << pipeConfig->captureSize << "-" << videoFormat
> +                       << " (got " << captureFormat << ")";
>                 return -EINVAL;
>         }
>  
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index de75465eb3b5..efb28ccd97e8 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -939,7 +939,8 @@  int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
 	    captureFormat.size != pipeConfig->captureSize) {
 		LOG(SimplePipeline, Error)
 			<< "Unable to configure capture in "
-			<< pipeConfig->captureSize << "-" << videoFormat;
+			<< pipeConfig->captureSize << "-" << videoFormat
+			<< " (got " << captureFormat << ")";
 		return -EINVAL;
 	}