[libcamera-devel] libcamera: pipeline: rkisp1: don't fail if sensorInfo fails

Message ID 20200429214450.27676-1-dafna.hirschfeld@collabora.com
State Accepted
Commit 80551b8754ddb822151576189050f9c7a8aa5ac2
Headers show
Series
  • [libcamera-devel] libcamera: pipeline: rkisp1: don't fail if sensorInfo fails
Related show

Commit Message

Dafna Hirschfeld April 29, 2020, 9:44 p.m. UTC
When starting the streaming, it might be that the call
to sensorInfo fails. This does not mean that the camera can't
stream so set 'ret' to 0

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart April 29, 2020, 9:51 p.m. UTC | #1
Hi Dafna,

Thank you for the patch.

On Wed, Apr 29, 2020 at 11:44:50PM +0200, Dafna Hirschfeld wrote:
> When starting the streaming, it might be that the call
> to sensorInfo fails. This does not mean that the camera can't
> stream so set 'ret' to 0

Oops :-/ I've added

Fixes: fd554f9dba31 ("libcamera: ipa: Add support for CameraSensorInfo")

(and a period after the last sentence of the commit message) and pushed
the patch. Thank you.

> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 1a34ffe..6aa3178 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -828,6 +828,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)
>  		/* \todo Turn this in an hard failure. */
>  		LOG(RkISP1, Warning) << "Camera sensor information not available";
>  		sensorInfo = {};
> +		ret = 0;
>  	}
>  
>  	std::map<unsigned int, IPAStream> streamConfig;
Jacopo Mondi April 29, 2020, 9:56 p.m. UTC | #2
Hi Dafna,
   good catch, my bad!

On Wed, Apr 29, 2020 at 11:44:50PM +0200, Dafna Hirschfeld wrote:
> When starting the streaming, it might be that the call
> to sensorInfo fails. This does not mean that the camera can't
> stream so set 'ret' to 0
>

This might be worth a
Fixes: fd554f9dba31 ("libcamera: ipa: Add support for CameraSensorInfo")

which can be added when applying though

> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 1a34ffe..6aa3178 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -828,6 +828,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)
>  		/* \todo Turn this in an hard failure. */
>  		LOG(RkISP1, Warning) << "Camera sensor information not available";
>  		sensorInfo = {};
> +		ret = 0;
>  	}
>
>  	std::map<unsigned int, IPAStream> streamConfig;
> --
> 2.17.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 1a34ffe..6aa3178 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -828,6 +828,7 @@  int PipelineHandlerRkISP1::start(Camera *camera)
 		/* \todo Turn this in an hard failure. */
 		LOG(RkISP1, Warning) << "Camera sensor information not available";
 		sensorInfo = {};
+		ret = 0;
 	}
 
 	std::map<unsigned int, IPAStream> streamConfig;