[v9,23/26] ipa: software_isp: Call createSelfEnumeratingAlgorithm() to statically instantiate CCM algo
diff mbox series

Message ID 20251217100138.82525-24-bryan.odonoghue@linaro.org
State New
Headers show
Series
  • Add GLES 2.0 GPUISP to libcamera
Related show

Commit Message

Bryan O'Donoghue Dec. 17, 2025, 10:01 a.m. UTC
Check the algorithm list. If CCM is not included call
createSelfEnumeratingAlgorithm() to have CCM initialise itself.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 src/ipa/simple/soft_simple.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Patch
diff mbox series

diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
index 2bbe271d9..cc263dc1f 100644
--- a/src/ipa/simple/soft_simple.cpp
+++ b/src/ipa/simple/soft_simple.cpp
@@ -137,6 +137,23 @@  int IPASoftSimple::init(const IPASettings &settings,
 	if (ret)
 		return ret;
 
+	bool ccmLoaded = false;
+
+	for (auto &algo : algorithms()) {
+		Algorithm<Module> *algoPtr = algo.get();
+		const std::type_info &info = typeid(*algoPtr);
+
+		if (std::string(info.name()).find("Ccm") != std::string::npos) {
+			ccmLoaded = true;
+		}
+	}
+
+	if (context_.gpuIspEnabled && !ccmLoaded) {
+		ret = createSelfEnumeratingAlgorithm(context_, std::string("Ccm"));
+		if (ret)
+			return ret;
+	}
+
 	*ccmEnabled = context_.ccmEnabled;
 
 	params_ = nullptr;