From patchwork Wed Oct 15 15:55:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 24686 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9241BBE080 for ; Wed, 15 Oct 2025 15:55:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6B2FF60622; Wed, 15 Oct 2025 17:55:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="dmkH0QpM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 114F260462 for ; Wed, 15 Oct 2025 17:55:35 +0200 (CEST) Received: from [192.168.1.106] (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1F0A4E7C; Wed, 15 Oct 2025 17:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1760543635; bh=HsmTyy8NZIYWU1dX5tn80IQKS2hSjtL8aNj5Ca71J8E=; h=From:Subject:Date:To:Cc:From; b=dmkH0QpMwNw3Dk+TPcvHRXFTCrstCgL7Lq9GwVzS4FqqkzQtFLrOHj94jsNXHobH7 wZo/WY/mmxYGeoHBAU/0PiukjOsp3aSnHaNAKB0zpUhqioRD2TS3gA/lyCd5IMknaZ sMu+Qel5seKXRt2ZTMYSLytcbv65OkQcUEU99taw= From: Jacopo Mondi Subject: [PATCH v3 0/4] ipa: Allow IPA creation by name Date: Wed, 15 Oct 2025 17:55:23 +0200 Message-Id: <20251015-ipa-match-by-name-v3-0-11f9c774c7fc@ideasonboard.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOvD72gC/4XNywqDMBCF4VcpWTclTrx21fcoXeQy1lmYSCKhI r57o9Cd0OV/YL5ZWcRAGNn9srKAiSJ5l0NeL8wMyr2Rk83NQEBVCAGcJsVHNZuB64U7NSJvAWs tSwUSO5bvpoA9fQ7z+co9UJx9WI4XqdjXnyZPtFRwwUWjm65uoCsLeJBFFb3TXgV7M35kO5rgL wQZqspeGttCa609gbZt+wKsN0O1AgEAAA== X-Change-ID: 20251002-ipa-match-by-name-82e6b34a23e9 To: libcamera-devel@lists.libcamera.org, =?utf-8?q?Niklas_S=C3=B6derlund?= , Hans de Goede , Milan Zamazal Cc: Jacopo Mondi , Kieran Bingham , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2918; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=HsmTyy8NZIYWU1dX5tn80IQKS2hSjtL8aNj5Ca71J8E=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBo78Pzgpgxj92DmXcxJdMY8hBuqTumK3+T2hL0Z HQ0N3tHLk+JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaO/D8wAKCRByNAaPFqFW PFDEEACKJptjhN1yW/H9n6yuHhu5o42wxGB+GNOK32GoWlqiSZJXwzwPpyH6eKIyq2EblORze6d 7YZxq+R7jqIbF1YJyennkoFlK3mfyYoToOfLA8Z6kyo3gPwKPffnWY2H8nP/kNqWRDABNvL0Cei fWtrwyvjnMZIkRsBjBc3HkqgdYzC4XSqCLL7dl0FFb2SzrKz+FPa6lhb0Osc0skekYJzpYbunFA g7mkqHf4GXkROGFnzXlNIEzz0sc80Id9dEmhe5jX2t7u6XvRC83x1/7PqeD3uL4iNQssSq9jApp WLPNjyzd1SYwFvDW3scskSYpv0fT+I7qdm0WbKah6PMJdN0RxlUOR/Bpj5Qn33oX9s1xeXdOoK9 1t1XlSCAbwz+dSrDWtKAkJD088BLA5j5hfk+EaMTkwH00tQ/A+VEbQkpbAY5rLmY98xcd035J+6 4seWDFkAV38dTmZAvQbuun8aFVOtPUW+waHouAAesedCBcZ4YjHSg6nLcpgPZ1abdt3iiMV9TCh mFOsTvB5zs1RnqpGLesjatGbubLsRyzO/rJgAXMoaXU5/2u+5obZMuEsGeNj+nQbFEfr5upn3H+ tbLXU4MHDOvYBJYvmMZbMvJ28f8KypR1S1tA97g33AgFf3aVwDVEiVLwIYhMCsoJyQHC9MhCHE+ QPEDlwRGIv5Vj+A== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=72392EDC88144A65C701EA9BA5826A2587AD026B X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" It is getting more and more common for different pipeline handlers to use the same IPA modules whose name differs from the pipeline's one. The first case has been the softISP, and now the in-review Renesas R-Car V4H pipeline handler will re-use the RkISP1 IPA. Starting from Hans' patch https://patchwork.libcamera.org/patch/23359/ "libcamera: ipa_manager: createIPA: Allow matching by IPA name instead of by pipeline" I here took a slightly different approach and addressed the review comments on Hans' v1 by creating an overload for IPAManager::createIPA() that allows pipelines to specify the IPA module name. If they don't provide a name, the pipeline handler's name is used. As the next step, to further decouple IPAs from pipelines, remove the pipelineName field from IPAModuleInfo that in all cases is identical to the IPA name itself. Finaly, in v3, allow to build IPA modules whose name differs from the pipeline. This is required for R-Car Gen4 which would otherwise require to build the rkisp1 pipeline in to get the IPA. I have considered more complex approaches that do not require a map in src/ipa/meson.build, like defining an 'auto' option for ipas, but it would have required to -Dpipelines=rcar-gen4 -Dipas=rkisp1 while a simple -Dpipelines=rcar-gen4 which ropes in rkisp1 IPA I think it's preferrable for users. Tested on R-Car Gen4 and on Mali-C55. Signed-off-by: Jacopo Mondi --- Changes in v3: - Add patches 3 and 4 Changes in v2: - Changed Hans authorship to different email address - Removed stray blank line - Collect tags --- Hans de Goede (1): libcamera: ipa_manager: Create IPA by name Jacopo Mondi (3): ipa: ipa_module: Remove pipelineName ipa: meson.build: Remove duplicated variable ipa: Allow pipelines to have differently named IPA include/libcamera/internal/ipa_manager.h | 13 +++++++++-- include/libcamera/internal/ipa_module.h | 4 ++-- include/libcamera/ipa/ipa_module_info.h | 1 - src/ipa/ipu3/ipu3.cpp | 1 - src/ipa/mali-c55/mali-c55.cpp | 1 - src/ipa/meson.build | 40 +++++++++++++++++++++++--------- src/ipa/rkisp1/rkisp1.cpp | 1 - src/ipa/rpi/pisp/pisp.cpp | 1 - src/ipa/rpi/vc4/vc4.cpp | 1 - src/ipa/simple/soft_simple.cpp | 1 - src/ipa/vimc/vimc.cpp | 1 - src/libcamera/ipa_manager.cpp | 34 ++++++++++++++++++++++----- src/libcamera/ipa_module.cpp | 27 ++++++++++----------- test/ipa/ipa_module_test.cpp | 3 --- 14 files changed, 82 insertions(+), 47 deletions(-) --- base-commit: 05bfebed2657cc1d032c9796efd9041bfbdc881c change-id: 20251002-ipa-match-by-name-82e6b34a23e9 Best regards,