[libcamera-devel] [PATCH] libcamera: pipeline: ipu3: Check for failures when loading IPA
Niklas Söderlund
niklas.soderlund at ragnatech.se
Fri Apr 16 22:42:46 CEST 2021
Hi Kieran,
On 2021-04-16 17:03:20 +0100, Kieran Bingham wrote:
> The ipa_->init() method can fail if the IPA can't load correctly.
> This should be caught by the pipeline handler to prevent continuing
> with an invalid IPA.
>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/libcamera/pipeline/ipu3/ipu3.cpp | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 519cad4f8148..51446fcf5bc1 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1145,7 +1145,11 @@ int IPU3CameraData::loadIPA()
> ipa_->queueFrameAction.connect(this, &IPU3CameraData::queueFrameAction);
>
> CameraSensor *sensor = cio2_.sensor();
> - ipa_->init(IPASettings{ "", sensor->model() });
> + int ret = ipa_->init(IPASettings{ "", sensor->model() });
> + if (ret) {
> + LOG(IPU3, Error) << "Failed to initialise the IPU3 IPA";
> + return ret;
> + }
>
> return 0;
> }
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list