Show a patch.

GET /api/patches/26916/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 26916,
    "url": "https://patchwork.libcamera.org/api/patches/26916/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26916/",
    "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": "<20260618-rppx1-ipa-v1-1-32337264cfcd@ideasonboard.com>",
    "date": "2026-06-18T10:18:40",
    "name": "[01/14] libcamera: ipa_manager: Create IPA by name",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "0ff1fb5c6472acc532fd9ef096722cd0e324d0d5",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26916/mbox/",
    "series": [
        {
            "id": 6003,
            "url": "https://patchwork.libcamera.org/api/series/6003/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6003",
            "date": "2026-06-18T10:18:39",
            "name": "libcamera: Add support for R-Car Gen4 and RPP-X1 ISP",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/6003/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26916/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26916/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 16C4CC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Jun 2026 10:18:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E6F10629A1;\n\tThu, 18 Jun 2026 12:18:55 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3F3C361754\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 12:18:53 +0200 (CEST)",
            "from [192.168.125.177] (mob-109-113-4-199.net.vodafone.it\n\t[109.113.4.199])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 832B5DF3;\n\tThu, 18 Jun 2026 12:18:17 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"J5WakPjz\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781777898;\n\tbh=WwkJjfrF6uYuCHNyMbb4OBFHOUidZxlMMtRfcHXwSLM=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=J5WakPjzxYmzs57OvZ0agjyd2yJTgNKkxAxEPVlxRCFJCp8VDHL4dYEKk1hnZq9LG\n\t6vGt2wxVWVjb0RnpDwEz355010ar5gVxt5CPT/wrdujLBz8X6bR328J8gEgBDED1cK\n\tJuPNMoze4/YmbWL5lwXyg9d5zum2blfsRwsXfsww=",
        "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Date": "Thu, 18 Jun 2026 12:18:40 +0200",
        "Subject": "[PATCH 01/14] libcamera: ipa_manager: Create IPA by name",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "8bit",
        "Message-Id": "<20260618-rppx1-ipa-v1-1-32337264cfcd@ideasonboard.com>",
        "References": "<20260618-rppx1-ipa-v1-0-32337264cfcd@ideasonboard.com>",
        "In-Reply-To": "<20260618-rppx1-ipa-v1-0-32337264cfcd@ideasonboard.com>",
        "To": "=?utf-8?q?Niklas_S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>, \n\tlibcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tHans de Goede <hansg@kernel.org>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "X-Mailer": "b4 0.14.3",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=8374;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=vuESyGRD9gC1WcSe588Ai3/ECLPgRNN9wbmW63B/y8U=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqM8YJ492R/nzPIuuD+HrJxEyHuf4ydkH6R0+ld\n\tntefURsa9uJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCajPGCQAKCRByNAaPFqFW\n\tPBtlD/0WjS/gn5GpQrDn/rLmNWxPL2az+iWmgIEw74PosfcBJTk6w5hAbE9cI6fK14wgvBy/e+w\n\t1K3KktK2BxC0ZWSIsHumLgSe036kX7/36rXex6WZuhnm9vop/e4XoOEYuaBOoWIeJCDNSq9A4sG\n\t6jmj49oBUWinRJOpY1/L0h0yM/q2jyCi2RjGFqVjtkkZr61BwxEnx7/rsnbpoKPVzB6O47rUdFP\n\t3zpJQo1tNGIKBHHZaEiVzmBMjMiq2bwYxmer0pokADqpm99esMw38FElNLtVYw4CJcqHMr0gLdT\n\tGhUAc3VRhB+8THXCnVj+I6tKeQNy68/wIHh5Sb884GRDJivM9c76axVafLkJXSusIFCPeu1uLmM\n\ttjVKWiuuSUmN8h2xyfMDK7OrXbNdWkxs556Ear7hXTL0CKiXpaVr1pnSb1z41J9KVAZ4S4WKZcc\n\tPkDNgMpDfh57UhBvS2Sc4W+iWmeszYCjEo9A/tgBbndzBVm92KTccIUpWfXwsWhj8fdC0IpCTIe\n\tRa4sVkM+dB0jvAqlQ3qfSpYthvNWi7phJjySJFq1fs/e8H8PcZ+s5k0+tF6ROaGut7agCRmwvSQ\n\tvmlLNhjfxuS6Njpi5LTnnGEL9irP69apo3HBPT+tqcc0iAEeWtyLZyRBbolPPkbSPnJq8XAsGna\n\tGck2cSGuIG6TL3g==",
        "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B",
        "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": "From: Hans de Goede <hansg@kernel.org>\n\nCurrently createIPA() / IPAManager::module() assume that there is a 1:1\nrelationship between pipeline handlers and IPAs and IPA matching is done\nbased on matching the pipe to ipaModuleInfo.pipelineName[].\n\nOne way to allow using a single IPA with multiple pipelines would be to\nallow the IPA to declare itself compatible with more than one pipeline,\nturning ipaModuleInfo.pipelineName[] into e.g. a vector. But the way\nipaModuleInfo is loaded as an ELF symbol requires it to be a simple flat\nC-struct.\n\nInstead, move the IPA creation procedure to be name-based, introducing\nan overload to IPAManager::createIPA(pipe, name, minVer, maxVer)  that\nallows to specify the name of the IPA module to match. Pipeline handlers\nthat wants to use their name as matching criteria can continue doing so\nusing the already existing createIPA(pipe, minVer, maxVer) overload.\n\nSigned-off-by: Hans de Goede <hansg@kernel.org>\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Hans de Goede <hansg@kernel.org>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nTested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>\n---\n include/libcamera/internal/ipa_manager.h      |  8 +++----\n include/libcamera/internal/ipa_module.h       |  4 ++--\n include/libcamera/internal/pipeline_handler.h |  9 ++++++-\n src/libcamera/ipa_manager.cpp                 | 34 ++++++++++++++++++++++-----\n src/libcamera/ipa_module.cpp                  | 12 +++++-----\n 5 files changed, 48 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h\nindex aaa3ca37c493..b9825c38d34e 100644\n--- a/include/libcamera/internal/ipa_manager.h\n+++ b/include/libcamera/internal/ipa_manager.h\n@@ -25,7 +25,6 @@ LOG_DECLARE_CATEGORY(IPAManager)\n class CameraManager;\n class GlobalConfiguration;\n class IPAModule;\n-class PipelineHandler;\n \n class IPAManager\n {\n@@ -34,10 +33,11 @@ public:\n \t~IPAManager();\n \n \ttemplate<typename T>\n-\tstd::unique_ptr<T> createIPA(PipelineHandler *pipe, uint32_t minVersion,\n+\tstd::unique_ptr<T> createIPA(const char *name,\n+\t\t\t\t     uint32_t minVersion,\n \t\t\t\t     uint32_t maxVersion)\n \t{\n-\t\tIPAModule *m = module(pipe, minVersion, maxVersion);\n+\t\tIPAModule *m = module(name, minVersion, maxVersion);\n \t\tif (!m)\n \t\t\treturn nullptr;\n \n@@ -68,7 +68,7 @@ private:\n \t\t      std::vector<std::string> &files);\n \tunsigned int addDir(const char *libDir, unsigned int maxDepth = 0);\n \n-\tIPAModule *module(PipelineHandler *pipe, uint32_t minVersion,\n+\tIPAModule *module(const char *name, uint32_t minVersion,\n \t\t\t  uint32_t maxVersion);\n \n \tbool isSignatureValid(IPAModule *ipa) const;\ndiff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\nindex 15f19492c3a0..a0a53764e139 100644\n--- a/include/libcamera/internal/ipa_module.h\n+++ b/include/libcamera/internal/ipa_module.h\n@@ -36,8 +36,8 @@ public:\n \n \tIPAInterface *createInterface();\n \n-\tbool match(PipelineHandler *pipe,\n-\t\t   uint32_t minVersion, uint32_t maxVersion) const;\n+\tbool match(const char *name, uint32_t minVersion,\n+\t\t   uint32_t maxVersion) const;\n \n protected:\n \tstd::string logPrefix() const override;\ndiff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\nindex 6922ce18ec87..d255c149f2f3 100644\n--- a/include/libcamera/internal/pipeline_handler.h\n+++ b/include/libcamera/internal/pipeline_handler.h\n@@ -76,7 +76,14 @@ public:\n \tstd::unique_ptr<T> createIPA(uint32_t minVersion, uint32_t maxVersion)\n \t{\n \t\tIPAManager *ipaManager = manager_->_d()->ipaManager();\n-\t\treturn ipaManager->createIPA<T>(this, minVersion, maxVersion);\n+\t\treturn ipaManager->createIPA<T>(this->name(), minVersion, maxVersion);\n+\t}\n+\n+\ttemplate<typename T>\n+\tstd::unique_ptr<T> createIPA(const char *name, uint32_t minVersion, uint32_t maxVersion)\n+\t{\n+\t\tIPAManager *ipaManager = manager_->_d()->ipaManager();\n+\t\treturn ipaManager->createIPA<T>(name, minVersion, maxVersion);\n \t}\n \n protected:\ndiff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\nindex 41918e4c2934..e60e947049d5 100644\n--- a/src/libcamera/ipa_manager.cpp\n+++ b/src/libcamera/ipa_manager.cpp\n@@ -248,15 +248,15 @@ unsigned int IPAManager::addDir(const char *libDir, unsigned int maxDepth)\n \n /**\n  * \\brief Retrieve an IPA module that matches a given pipeline handler\n- * \\param[in] pipe The pipeline handler\n+ * \\param[in] name The IPA module string identifier\n  * \\param[in] minVersion Minimum acceptable version of IPA module\n  * \\param[in] maxVersion Maximum acceptable version of IPA module\n  */\n-IPAModule *IPAManager::module(PipelineHandler *pipe, uint32_t minVersion,\n+IPAModule *IPAManager::module(const char *name, uint32_t minVersion,\n \t\t\t      uint32_t maxVersion)\n {\n \tfor (const auto &module : modules_) {\n-\t\tif (module->match(pipe, minVersion, maxVersion))\n+\t\tif (module->match(name, minVersion, maxVersion))\n \t\t\treturn module.get();\n \t}\n \n@@ -264,12 +264,34 @@ IPAModule *IPAManager::module(PipelineHandler *pipe, uint32_t minVersion,\n }\n \n /**\n- * \\fn IPAManager::createIPA()\n- * \\brief Create an IPA proxy that matches a given pipeline handler\n- * \\param[in] pipe The pipeline handler that wants a matching IPA proxy\n+ * \\fn IPAManager::createIPA(PipelineHandler *pipe, const char *ipaName, uint32_t minVersion, uint32_t maxVersion)\n+ * \\brief Create an IPA proxy that matches the requested name and version\n+ * \\param[in] pipe The pipeline handler that wants to create the IPA module\n+ * \\param[in] ipaName The IPA module name\n  * \\param[in] minVersion Minimum acceptable version of IPA module\n  * \\param[in] maxVersion Maximum acceptable version of IPA module\n  *\n+ * Create an IPA module using \\a name as the matching identifier. This overload\n+ * allows pipeline handlers to create an IPA module by specifying its name\n+ * instead of relying on the fact that the IPA module matches the pipeline\n+ * handler's one.\n+ *\n+ * \\return A newly created IPA proxy, or nullptr if no matching IPA module is\n+ * found or if the IPA proxy fails to initialize\n+ */\n+\n+/**\n+ * \\fn IPAManager::createIPA(PipelineHandler *pipe, uint32_t minVersion, uint32_t maxVersion)\n+ * \\brief Create an IPA proxy that matches the pipeline handler name and the\n+ * requested version\n+ * \\param[in] pipe The pipeline handler that wants to create the IPA module\n+ * \\param[in] minVersion Minimum acceptable version of IPA module\n+ * \\param[in] maxVersion Maximum acceptable version of IPA module\n+ *\n+ * Create an IPA module using the pipeline handler name as the matching\n+ * identifier. This overload allows pipeline handler to create an IPA module\n+ * whose name matches the pipeline handler one.\n+ *\n  * \\return A newly created IPA proxy, or nullptr if no matching IPA module is\n  * found or if the IPA proxy fails to initialize\n  */\ndiff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex e6ea61e44829..0bd6f14626fe 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -463,21 +463,21 @@ IPAInterface *IPAModule::createInterface()\n \n /**\n  * \\brief Verify if the IPA module matches a given pipeline handler\n- * \\param[in] pipe Pipeline handler to match with\n+ * \\param[in] name The IPA module name\n  * \\param[in] minVersion Minimum acceptable version of IPA module\n  * \\param[in] maxVersion Maximum acceptable version of IPA module\n  *\n- * This function checks if this IPA module matches the \\a pipe pipeline handler,\n+ * This function checks if this IPA module matches the requested \\a name\n  * and the input version range.\n  *\n- * \\return True if the pipeline handler matches the IPA module, or false otherwise\n+ * \\return True if the IPA module matches, or false otherwise\n  */\n-bool IPAModule::match(PipelineHandler *pipe,\n-\t\t      uint32_t minVersion, uint32_t maxVersion) const\n+bool IPAModule::match(const char *name, uint32_t minVersion,\n+\t\t      uint32_t maxVersion) const\n {\n \treturn info_.pipelineVersion >= minVersion &&\n \t       info_.pipelineVersion <= maxVersion &&\n-\t       !strcmp(info_.pipelineName, pipe->name());\n+\t       !strcmp(info_.name, name);\n }\n \n std::string IPAModule::logPrefix() const\n",
    "prefixes": [
        "01/14"
    ]
}