Patch Detail
Show a patch.
GET /api/patches/25259/?format=api
{ "id": 25259, "url": "https://patchwork.libcamera.org/api/patches/25259/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25259/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20251127023739.179652-23-bryan.odonoghue@linaro.org>", "date": "2025-11-27T02:37:37", "name": "[v5,22/24] ipa: libipa: module: Add createSelfEnumeratingAlgorithm", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5728910e8ee2b83ddf96bf04874ce89f3b04c664", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25259/mbox/", "series": [ { "id": 5617, "url": "https://patchwork.libcamera.org/api/series/5617/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5617", "date": "2025-11-27T02:37:15", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 5, "mbox": "https://patchwork.libcamera.org/series/5617/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25259/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25259/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D3204C32E7\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 02:38:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8A1EB60C6F;\n\tThu, 27 Nov 2025 03:38:34 +0100 (CET)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8C93C60AD0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:38:30 +0100 (CET)", "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-477632d9326so1689025e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 18:38:30 -0800 (PST)", "from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4790552c3c9sm58186345e9.0.2025.11.26.18.38.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Nov 2025 18:38:28 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"F+odiLz1\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764211110; x=1764815910;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=e1pvUqnYS1JGS35UGpDUFqEIzGsf/5dEKRFZ9jpd2jQ=;\n\tb=F+odiLz13Sbgj9+yQLaXrZzjCGeT9nREiW20SRth2gyi7FqNPvCUv+KkLMfpaI0bCq\n\tru7hx3QI+MU5K44d8y2Qw/g5O4NOXFyDYvWDbRJWV9UNIz2NIXVp1B70kb4bOmc2jLpA\n\teUSagcWWcDqWb0FMOH2oml90ETE2n2u7Rhox1Ca5agUeb5qB8rdB518fD+RJMlDVmMvh\n\tjv55sSbDqNHj6d6MZpIS5ZvtiTbO18a+/FL0OomNrIge2tKSr6wxDWF30QrT5EaTvVaE\n\tWogOuPZ94dTiexefcCBJvG733aixkTjxCsT5IvRVv2tBMJ0qQhXSbeiteFBfIibPKU/t\n\tdMaw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764211110; x=1764815910;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=e1pvUqnYS1JGS35UGpDUFqEIzGsf/5dEKRFZ9jpd2jQ=;\n\tb=O/wmDzkhYrgQeZPiqq70u+Wv3Ps1fR1ae0hh4ZFYlLyNLN5+IkrSXcFJaF6gRR0bfn\n\tR1Nh6SE0WliA81/g5klJw4Zg7lS8HR64yDQ6MBeH+Bi+dajXsYXo8UyJuWPzyiJ0/5at\n\tmn1ssAonAk3bnur/i0aYfwdBPDfLtus1Y7PEA5YReuzyR6dxPZ9JneoFrxNk+6BSRbq0\n\tdVPniPN/AlsHhHacarnjn6NlAlovzEpjO1VeyJ6NXQqq+ABleJcR9/e/hebyMAIYToWE\n\tSEWJCBe6lXA2xBkMzJ/VaqShWX00rwYYHctqVYx7pFwnNngvaSx/Bob3liBMu4q6+Ap2\n\tOeuw==", "X-Gm-Message-State": "AOJu0YxmGz1FkWGzqCLvgok/vGTqyUplj+vB8XesCXOlSCaAugUzT/ip\n\tIrNLSKcS6B+0UBI28rF5YnS6A3mP2lhavPYh6Lj0THqo1ul3wo66zZD4UhZEm6WQ12ngSQ7A6Qe\n\tKVZiT7ac=", "X-Gm-Gg": "ASbGnct0vmmSscp905hLihr414zGgqWUsGyMx3Dn/HdoZlbnamry8xRZcq6hqokF2a6\n\tpM+8WV2HLLdGGhJOCOB1Sj5jo95eJFXwFERfe7KpJMvf/ZHqpPZl//x9iZy1g5UMxCXR/c5Z0lH\n\tSRKXzMs3znwxY+f+7uX+LzgE3PWUSDLsO0uexqdo56JYE0ntMNjLfzxhU9k5eb0yyigVX8vSJ8s\n\tUfcWxLOuiGlfXWEET5GBdlwdhAkb9bn58XZf3pL/jyASRsPIpdDBTxh6B84ZvkFjrDgfGedKS+q\n\t6QbfErwb8F8HqjgjcCi4eYgEKkJMmAgEUbVU99AgTadOiAwnS6kdq+xVDIKK1+YJLeDp+L8wEU5\n\tb1rcCugvA9j3RhyyNmSq/N7TcGgERS2gYbH1Gu9dSaHC3TgKwJSavArx1ShFstsOJcTisMFb2hQ\n\tzYHTUag0QcvQ+lict21hIAge3Zjf7k18WPjQ8g0p8rxixvePA47bOBolffgRBRj8hwGvo=", "X-Google-Smtp-Source": "AGHT+IEwcxTZY0Cb0FU6rZAJA0EnNJ0oSzL1UQvMnf/VO67qkvq6wtAEhLAUtkC5xkG6wcgN03yOPA==", "X-Received": "by 2002:a05:600c:3b09:b0:471:13fa:1b84 with SMTP id\n\t5b1f17b1804b1-477c0185bc8mr249392525e9.12.1764211109900; \n\tWed, 26 Nov 2025 18:38:29 -0800 (PST)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>", "Subject": "[PATCH v5 22/24] ipa: libipa: module: Add\n\tcreateSelfEnumeratingAlgorithm", "Date": "Thu, 27 Nov 2025 02:37:37 +0000", "Message-ID": "<20251127023739.179652-23-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.2", "In-Reply-To": "<20251127023739.179652-1-bryan.odonoghue@linaro.org>", "References": "<20251127023739.179652-1-bryan.odonoghue@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/ipa/libipa/module.h | 41 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)", "diff": "diff --git a/src/ipa/libipa/module.h b/src/ipa/libipa/module.h\nindex c27af7718..f320291e6 100644\n--- a/src/ipa/libipa/module.h\n+++ b/src/ipa/libipa/module.h\n@@ -70,6 +70,47 @@ public:\n \t\tfactories().push_back(factory);\n \t}\n \n+\t/**\n+\t * \\fn int Module::createSelfEnumeratingAlgorithm(Context &context, const std::string &name)\n+\t * \\brief Create and initialise a self-enumerating algorithm by name\n+\t * \n+\t * This function creates an algorithm instance from the registered algorithm\n+\t * factories using only the algorithm name, without requiring YAML configuration\n+\t * data.\n+\t * \n+\t * This is useful for algorithms that don't require external configuration\n+\t * parameters and can self-configure or use default values.\n+\t * \n+\t * \\param[in] context The IPA context to pass to the algorithm's init function\n+\t * \\param[in] name The name of the algorithm to instantiate\n+\t * \n+\t * \\return 0 on success, negative errno value on failure:\n+\t * -EINVAL if the algorithm is not found in the factory registry\n+\t * Other negative values if algorithm initialisation fails\n+\t */\n+\tint createSelfEnumeratingAlgorithm(Context &context, const std::string &name)\n+\t{\n+\t\tstd::unique_ptr<Algorithm<Module>> algo = createAlgorithm(name);\n+\t\tif (!algo) {\n+\t\t\tLOG(IPAModuleAlgo, Error)\n+\t\t\t\t<< \"Algorithm '\" << name << \"' not found\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tint ret = algo->init(context);\n+\t\tif (ret) {\n+\t\t\tLOG(IPAModuleAlgo, Error)\n+\t\t\t\t<< \"Algorithm '\" << name << \"' failed to initialize\";\n+\t\t\treturn ret;\n+\t\t}\n+\n+\t\tLOG(IPAModuleAlgo, Debug)\n+\t\t\t<< \"Instantiated algorithm '\" << name << \"'\";\n+\n+\t\talgorithms_.push_back(std::move(algo));\n+\t\treturn 0;\n+\t}\n+\n private:\n \tint createAlgorithm(Context &context, const YamlObject &data)\n \t{\n", "prefixes": [ "v5", "22/24" ] }