Patch Detail
Show a patch.
GET /api/patches/24690/?format=api
{ "id": 24690, "url": "https://patchwork.libcamera.org/api/patches/24690/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24690/", "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": "<20251015-ipa-match-by-name-v3-4-11f9c774c7fc@ideasonboard.com>", "date": "2025-10-15T15:55:27", "name": "[v3,4/4] ipa: Allow pipelines to have differently named IPA", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "24f47a2625931a00d343579e8ee5fe9be64e295b", "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/24690/mbox/", "series": [ { "id": 5505, "url": "https://patchwork.libcamera.org/api/series/5505/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5505", "date": "2025-10-15T15:55:23", "name": "ipa: Allow IPA creation by name", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5505/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24690/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24690/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 49E2EC3332\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Oct 2025 15:55:42 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B8FB860624;\n\tWed, 15 Oct 2025 17:55:41 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B047560628\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Oct 2025 17:55:36 +0200 (CEST)", "from [192.168.1.106] (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2E51416C5;\n\tWed, 15 Oct 2025 17:53:57 +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=\"Fg+6wEUE\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760543637;\n\tbh=2Bxs7dUYHz3fobXnR2cEBW56/G43T4o+OpEhmNGQUms=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=Fg+6wEUELYRHkCkafcWMvevUAsF1BZCC8CIZxhA3OGggcfo0s2Ixj14EPMmrTy+JE\n\t4l3jESlE7bAT/lBZIxERECNYImfAVE8vgttLtG+Q/xBbvBMpGakIKxvJgbNNS4IKs9\n\tCuTN7RA8n4adiPRfSNpQKlh7RknkzZluoX5OP0Yc=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Wed, 15 Oct 2025 17:55:27 +0200", "Subject": "[PATCH v3 4/4] ipa: Allow pipelines to have differently named IPA", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20251015-ipa-match-by-name-v3-4-11f9c774c7fc@ideasonboard.com>", "References": "<20251015-ipa-match-by-name-v3-0-11f9c774c7fc@ideasonboard.com>", "In-Reply-To": "<20251015-ipa-match-by-name-v3-0-11f9c774c7fc@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org, =?utf-8?q?Niklas_S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>, Hans de Goede\n\t<hansg@kernel.org>, Milan Zamazal <mzamazal@redhat.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "X-Mailer": "b4 0.14.2", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=3917;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=2Bxs7dUYHz3fobXnR2cEBW56/G43T4o+OpEhmNGQUms=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBo78P1y0mlprifc10GMZnmt/xzRpogWWPA/LZv0\n\td8fCCACQp+JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaO/D9QAKCRByNAaPFqFW\n\tPEcbEACMNQQRBrgGO6ALnciGs3wd8NwykPgrrEaeHG4+LWCP29mlEyZTXC27b5EFfRkRNT5jKM5\n\tGlq95wpWWUAgz9d62RMkvJhzocxkfKCFfXiDXiwU+wWUq6sCUqHf86YPcLStw0fT1agC3/aO/3L\n\tfjGgoZOKnr+GYbtOIJxgncE68JDBLU86nFSGxO3RHFQ3cRJlChnKn4+5gvYKf8izUmX08+pXCVc\n\tUqpWzTDDnO+wJTl7lYmaaB+sGLb6flmsMLjl9zqrl65HjzgG6c+X4gFJ5B4KxSEnanqwvGKRbg0\n\tm0NtmQJrRnLcNLp7yv4A8GKV+6wahVtHMLlv8UXk2qfV7lfQincpBUdJ3EG4fYXTFK6rZR47uUr\n\tb/Ba4vaoaKh7foo7rM4W4VrqNomd9of+Z7P3vzbhqTfH+BDj3hYRqoMAWHUt78D4rAkAyOP99OE\n\tTQAHvNB1Db5BUtWWhc5+KvaVIUqAdmHfn7Cl4+/P+WpHHPL2SD+T/GMdWDNlJkO+qmUQR/bEKEJ\n\tO2ewNnNtr/wLOtlx26AoSx3w+SdELxQoksgOzM/J1lCJhzrWX7ayXSvY/YkHe19+77DZhlD6NO7\n\t56q8V9ycPN0B/BlcUv4mQW7YkJchMdE2SZLpteXIYTLdxVj4xsZp3mHNyGZQiG7Rug/jKWLJBAw\n\t1us0G889nVSuIyA==", "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": "Right now the build system assumes a 1-to-1 matching between a pipeline\nhandler name and an IPA module.\n\nThis, as also acknowledged by a \\todo comment, is quite a rigid\nrequirement and only allows a 1-to-1 matching between pipeline and IPA\nnames. The more platforms libcamera supports, the more it is likely that\na pipeline handler could re-use an IPA module. This is particularly\nrelevant for the softISP IPA module which could theoretically be plugged\nto any pipeline. Likewise, the forthcoming R-Car Gen4 support uses the\nRkISP1 IPA and at the moment would require building the 'rkisp1'\npipeline in to have the IPA module available.\n\nWhen building IPAs, the build system iterates the list of enabled\npipeline handlers and for each of them tries to verify if the 'ipas'\nlist contains a corresponding entry for it. The 'ipas' meson options is\nan array option and, as no default value is specified for it, it\ncontains by default all its possible choices.\n\nIn this way if no value is specified for the 'ipas' option, compiling\nthe pipeline handlers ['X','Y', 'Z'] will compile the ['X', 'Y', 'Z']\nIPAs. If instead the user specifies '-Dipas=X' during the configuration\nthen only IPA module ['X'] will be built, regardless of which pipeline is\nenabled. Building an IPA module will anyway require to build a\ncorresponding pipeline with the same name.\n\nRelax the 1-to-1 'pipeline'-'IPA' naming requirement by introducing a\ndictionary that associates pipelines with IPA modules.\n\nFor each enabled pipeline:\n1) Make sure an IPA module exists for it\n2) Make sure the IPA module is enabled by the 'ipas' option\n3) Make sure the IPA is compiled once only\n\nThis will require every new pipeline to add an entry to the dictionary\nand specify which IPA module they would like to use.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/meson.build | 40 ++++++++++++++++++++++++++++++----------\n 1 file changed, 30 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/ipa/meson.build b/src/ipa/meson.build\nindex eb7846e47888d4056b81e4a68f1903f134e6a662..c583c7efdd35170ab31d92fd8347ecdceaba5a31 100644\n--- a/src/ipa/meson.build\n+++ b/src/ipa/meson.build\n@@ -24,6 +24,16 @@ subdir('libipa')\n \n ipa_sign = files('ipa-sign.sh')\n \n+supported_ipas = {\n+ 'ipu3': 'ipu3',\n+ 'mali-c55': 'mali-c55',\n+ 'rkisp1': 'rkisp1',\n+ 'rpi/pisp': 'rpi/pisp',\n+ 'rpi/vc4': 'rpi/vc4',\n+ 'simple': 'simple',\n+ 'vimc': 'vimc'\n+}\n+\n ipa_modules = get_option('ipas')\n \n # Tests require the vimc IPA, similar to vimc pipline-handler for their\n@@ -39,24 +49,34 @@ ipa_names = []\n \n subdirs = []\n foreach pipeline : pipelines\n- # The current implementation expects the IPA module name to match the\n- # pipeline name.\n- # \\todo Make the IPA naming scheme more flexible.\n- if not ipa_modules.contains(pipeline)\n+ # Make sure an IPA exists for the pipeline\n+ if not supported_ipas.has_key(pipeline)\n+ continue\n+ endif\n+\n+ ipa = supported_ipas.get(pipeline)\n+\n+ # Only build IPAs specified with '-Dipas'\n+ if not ipa_modules.contains(ipa)\n+ continue\n+ endif\n+\n+ # If enabled already do not add it twice\n+ if enabled_ipa_names.contains(ipa)\n continue\n endif\n- enabled_ipa_names += pipeline\n+ enabled_ipa_names += ipa\n \n # Allow multi-level directory structuring for the IPAs if needed.\n- pipeline = pipeline.split('/')[0]\n- if pipeline in subdirs\n+ ipa = ipa.split('/')[0]\n+ if ipa in subdirs\n continue\n endif\n \n- subdirs += pipeline\n- subdir(pipeline)\n+ subdirs += ipa\n+ subdir(ipa)\n \n- # Don't reuse the pipeline variable below, the subdirectory may have\n+ # Don't reuse the ipa variable below, the subdirectory may have\n # overwritten it.\n endforeach\n \n", "prefixes": [ "v3", "4/4" ] }