summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-04-16 17:03:20 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-04-17 20:45:02 +0100
commit9b5478e7259a403f847083ec4af239fa70428768 (patch)
treeeb6fbef14885519a18068e6400a9cdba128166b1
parent5a76290b5de9ab5bc84928bab011d70860b23b26 (diff)
libcamera: pipeline: ipu3: Check for failures when loading IPA
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@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 519cad4f..51446fcf 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;
}