[libcamera-devel] [PATCH v3 4/6] libcamera: ipa_manager: Re-arrange IPA precedence
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Feb 20 17:57:02 CET 2020
Setting a user environment path in LIBCAMERA_IPA_MODULE_PATH should take
precedence over the system loading locations.
Adjust the IPA search orders accordingly.
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
src/libcamera/ipa_manager.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index c30b4555290f..3b1d4c0b295e 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -98,24 +98,24 @@ IPAManager::IPAManager()
unsigned int ipaCount = 0;
int ret;
- ret = addDir(IPA_MODULE_DIR);
- if (ret > 0)
- ipaCount += ret;
-
+ /* User specified paths take precedence. */
const char *modulePaths = utils::secure_getenv("LIBCAMERA_IPA_MODULE_PATH");
- if (!modulePaths) {
+ if (modulePaths) {
+ ipaCount += addPath(modulePaths);
+
if (!ipaCount)
LOG(IPAManager, Warning)
- << "No IPA found in '" IPA_MODULE_DIR "'";
- return;
+ << "No IPA found in '" << modulePaths << "'";
}
- ipaCount += addPath(modulePaths);
+ /* Load IPAs from the installed system path. */
+ ret = addDir(IPA_MODULE_DIR);
+ if (ret > 0)
+ ipaCount += ret;
if (!ipaCount)
LOG(IPAManager, Warning)
- << "No IPA found in '" IPA_MODULE_DIR "' and '"
- << modulePaths << "'";
+ << "No IPA found in '" IPA_MODULE_DIR "'";
}
IPAManager::~IPAManager()
--
2.20.1
More information about the libcamera-devel
mailing list