[libcamera-devel] [PATCH v2] libcamera: pipeline: vimc: Fail without an IPA
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Jun 16 16:34:30 CEST 2021
The IPA is required for VIMC so fail early if it can't be loaded.
Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
src/libcamera/pipeline/vimc/vimc.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 1713dc0ca932..1c4135cc6daa 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -427,13 +427,14 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
return false;
data->ipa_ = IPAManager::createIPA<ipa::vimc::IPAProxyVimc>(this, 0, 0);
- if (data->ipa_ != nullptr) {
- std::string conf = data->ipa_->configurationFile("vimc.conf");
- data->ipa_->init(IPASettings{ conf, data->sensor_->model() });
- } else {
- LOG(VIMC, Warning) << "no matching IPA found";
+ if (!data->ipa_) {
+ LOG(VIMC, Error) << "no matching IPA found";
+ return false;
}
+ std::string conf = data->ipa_->configurationFile("vimc.conf");
+ data->ipa_->init(IPASettings{ conf, data->sensor_->model() });
+
/* Create and register the camera. */
std::set<Stream *> streams{ &data->stream_ };
std::shared_ptr<Camera> camera =
--
2.30.2
More information about the libcamera-devel
mailing list