[libcamera-devel] [PATCH 09/11] libcamera: pipeline: vimc: Pass configuration file to IPA init()

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Apr 27 05:17:11 CEST 2020


Pass the vimc IPA dummy configuration file to the IPA init() function.
This will be used by the IPA to validate the init() call.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/libcamera/pipeline/vimc/vimc.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 699f788aa1b8..ec3ee7241cdf 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -371,10 +371,12 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
 	std::unique_ptr<VimcCameraData> data = std::make_unique<VimcCameraData>(this);
 
 	data->ipa_ = IPAManager::instance()->createIPA(this, 0, 0);
-	if (data->ipa_ == nullptr)
+	if (data->ipa_ != nullptr) {
+		std::string conf = data->ipa_->configurationFile("vimc.conf");
+		data->ipa_->init(IPASettings{ conf });
+	} else {
 		LOG(VIMC, Warning) << "no matching IPA found";
-	else
-		data->ipa_->init(IPASettings{});
+	}
 
 	/* Locate and open the capture video node. */
 	if (data->init(media))
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list