From patchwork Mon Aug 17 13:40:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 27829 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 C7B45C3264 for ; Mon, 17 Aug 2026 13:40:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 496686829C; Mon, 17 Aug 2026 15:40:57 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="chNitq7p"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YWzamWDq"; dkim-atps=neutral Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7AF0368244 for ; Mon, 17 Aug 2026 15:40:51 +0200 (CEST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67HD5oB82238690 for ; Mon, 17 Aug 2026 13:40:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=EQ1XZRbZGRy B3as4gr3aCKmf2sK+9RMxmTWtjPgyi3Q=; b=chNitq7pOhGhu7aOjd4D4rcR+iO gwUGry/YMhnWyCIpa2bO3vFf+7Ogf9HG4JPyHvOLWynLeipJZEUcHn9Y5SeFjeF9 PGSfRv8TyFuO/WIkHIZUd3E6+KyJVqXP3GcNvqzbwP+TuQQwzm2Umh+v2ZuyW5cw Uc7HCkMHkJDo+MqQT4nQmBXWm1qfB77O8YTj4LUWf0ATUucYsNyrbJ6FXsa+qFEV mXjqc3x6tHRTGiX6rehtIAGxbFG8+aiMBiscL2/BH9c9H0pIEOaV3nonTTWC58mw 7tTegIJxfp66OSiMH2fKoRObiKcxNhZesEhue2HK5YUMprRL2cw8k6xCd1g== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g3xyk95cc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 17 Aug 2026 13:40:49 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-92e695a3b28so449115685a.1 for ; Mon, 17 Aug 2026 06:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786974049; x=1787578849; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=EQ1XZRbZGRyB3as4gr3aCKmf2sK+9RMxmTWtjPgyi3Q=; b=YWzamWDq/7ilznQ5ttCyzV+BmWJhb/sD3aocZIkSFRSbxJ7OUzfI7Qd1JwI0XxwEwi cQXk5+3vqWGsHsMtVFjMI9vsaURSUzAxaOWvCNcB7dxBgq7v7Rb162a8HgLN87qZ/yUR TufVL9yT8/sumR+yrYEIjVdhv5ChcG3qhDFzY1wUe+ouInsAXm72JW422lb2wwHTiUoS 8Z8gvrkfofBKKo4qO3LWy9Kxe6kvRkGpsY/j01xutIq4F3Q0oqU/WzssAnA17hbIhUNc c9I9aXsGCz/73W1ZrvOrG3MKPijzhzA0y+SGJ7X8s62T9Ic8Hor17Qhez48IWEAv0Jcx ob3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786974049; x=1787578849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=EQ1XZRbZGRyB3as4gr3aCKmf2sK+9RMxmTWtjPgyi3Q=; b=kyppuBS7WwzDKnKVEj35yF2h9/ug+2Cc/i/lb6rQ1ST5VTQwEk/f3q2Sfekcbx3WUi HQJqMSvO6juWm0Eu9L5M0jtrLkpjtMD+4p5bM28iwWjLVB18FVj8Y5QOFtHf2TLyzNrd VNsxh5POA+04WDOwJtjqTE/+8cHX2CtscI8+nZCw9LzUJFNI8kGzYMJZ8nI5N+s2mSyW GdfYhZrgjaOTEIsy/INXekWwV4qG8tmuBxFKPh0D1mBRRKYpnAn0+SiPjNmUCCi4Q1oX 7cPkiKei9d50O0IqRHPkbVdGRPjLMBBzvBipPfBiiSqAdUZ56agl0kBs01ZO8h7rHb9O 7DBA== X-Gm-Message-State: AOJu0YykC6OOC4CYqLgPGkamj9hRYFYKR4StkVtNSZ4rtZCUHYJKtRW9 VGbihLP40RwUzpHCUxz50+OG5HBaDQrv8/9x+sQMJ1xdy01HxX2++qzSyeCmOAYI8CSwKZr5wOO 1hH8pCikBpv/UIxJT3Vzesrr+NcCc6ZXYbIt6yP1XrmE3uNfxo+CqXuMbAd6ebaIj9Ngfb3jzSz iUDik5Nbjk X-Gm-Gg: AR+sD12/c/BrO+IXMjE/20eybtyTFZzF+gpJ2Bnt2xLwmqWdQ3i6ovx9yGQVfgZs17+ fgV8zDLrSyU+pYmR2bee1QpEUN1NNI1B3Xbl3sAlOjDq78DjwabQhlXpDZ7EU5dgWAqla2zijuP pqoOpHegrW4cDHVBK69fje/Q+zNmcVYuiIHPGDOSFCDWKW4fAPDAxwSkf5x/kl7jDpzGKLrXvqj bwm88e0Jd6wDoPiu2fmDT8yxMJwSTY8NSwu+7CjI93XSOSfRwnXLNiW/L1Phf1sqoyZbUDVYLfZ PJRp/ZAcZSdJHyxKO41FRdsdSvDogx03VWWZqXC42HbIs5YVxgUMMG4AHfYbYIkkJB1mBhD/Pan sCVQmDEk+AneD/ae4JcLpoTiKo7Uv X-Received: by 2002:a05:620a:4442:b0:936:a8a0:cdf0 with SMTP id af79cd13be357-936c07231e8mr3117152985a.15.1786974049118; Mon, 17 Aug 2026 06:40:49 -0700 (PDT) X-Received: by 2002:a05:620a:4442:b0:936:a8a0:cdf0 with SMTP id af79cd13be357-936c07231e8mr3117147985a.15.1786974048671; Mon, 17 Aug 2026 06:40:48 -0700 (PDT) Received: from t14s.vakwerkhuis.com ([78.108.130.194]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a3d8517181sm772179a12.1.2026.08.17.06.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 06:40:47 -0700 (PDT) From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6?= =?utf-8?q?derlund?= , Loic Poulain , Hans de Goede Subject: [PATCH v8 3/8] ipa: Allow pipelines to have differently named IPA Date: Mon, 17 Aug 2026 15:40:37 +0200 Message-ID: <20260817134042.277168-4-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817134042.277168-1-johannes.goede@oss.qualcomm.com> References: <20260817134042.277168-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-GUID: APheuCPD_K_rgHmqy11pk40QMPShy5Ae X-Proofpoint-ORIG-GUID: APheuCPD_K_rgHmqy11pk40QMPShy5Ae X-Authority-Analysis: v=2.4 cv=dLaWXuZb c=1 sm=1 tr=0 ts=6a830f61 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=rrvG0T/C2D967D07Ol03YQ==:17 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=P1BnusSwAAAA:8 a=EUspDBNiAAAA:8 a=c6ydndUcIca2Pb-fbGsA:9 a=IoWCM6iH3mJn3m4BftBB:22 a=D0XLA9XvdZm18NrgonBM:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODE3MDEwNCBTYWx0ZWRfXzb+4WyI2uhbj JE13AZxb+zTIAKyt8Lh+tHuPMQJUNUjeuUoPd+lEmXb58BGfTioBXyAaOe6SgWA1jxW0Pq1wVH6 QSJrdZG+QjW+5sI0vPtX1D0G3Oes03uqLnMyOTkTchRu0wq4zpkJh9lqyGajU4djlV3cOKNmeAf 8UIDQNwurOwblhecHtZZJkuj7C91qsd4C3Ldxiqoqcq1RQkDtpH0bGXrOULQp/8kInaW+U6FSjH UJT4V+r0LW2RvGGQWicHCxJjH+52wtkBT3Kk99Mw9tnE6nQ9WU2jKj7rctd07TZ13LRhz9JbDO4 e3XbrdsP2XrRdwgPJfj3Y+1f4Lig94V4f45/jfcc+1w0+ZVydu4V77YqYfps6Ftol3qhBYTf5nW lsfYKKeyNmozT0xu3V+XqW7YmUUg8bcMwtwUB5RehB0/X99FFSYdge7s45g+WUphovvNk/Vf6RB mNSCt9YcmjzmgirDt4A== X-Proofpoint-Spam-Info: AW1haW4tMjYwODE3MDEwNCBTYWx0ZWRfX+Kf0hk1yNVkj eU7jC7FLphnHVVtyByAgWEVFOED4gAZgG6WT2QgpCrw+R4ss/YlwYNUoP4vNA8Sc+MPJOlHP/j2 +m3qrUNmq4M9r0mi4kwfr/SH9QQYx9w= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1176, Hydra:6.1.134, FMLib:17.12.100.49 definitions=2026-08-17_01,2026-08-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608170104 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" From: Jacopo Mondi Right now the build system assumes a 1-to-1 matching between a pipeline handler name and an IPA module. This, as also acknowledged by a \todo comment, is quite a rigid requirement and only allows a 1-to-1 matching between pipeline and IPA names. The more platforms libcamera supports, the more it is likely that a pipeline handler could re-use an IPA module. This is particularly relevant for the softISP IPA module which could theoretically be plugged to any pipeline. When building IPAs, the build system iterates the list of enabled pipeline handlers and for each of them tries to verify if the 'ipas' list contains a corresponding entry for it. The 'ipas' meson options is an array option and, as no default value is specified for it, it contains by default all its possible choices. In this way if no value is specified for the 'ipas' option, compiling the pipeline handlers ['X','Y', 'Z'] will compile the ['X', 'Y', 'Z'] IPAs. If instead the user specifies '-Dipas=X' during the configuration then only IPA module ['X'] will be built, regardless of which pipeline is enabled. Building an IPA module will anyway require to build a corresponding pipeline with the same name. Relax the 1-to-1 'pipeline'-'IPA' naming requirement by introducing a dictionary that associates pipelines with IPA modules. For each enabled pipeline: 1) Make sure an IPA module exists for it 2) Make sure the IPA module is enabled by the 'ipas' option 3) Make sure the IPA is compiled once only This will require every new pipeline to add an entry to the dictionary and specify which IPA module they would like to use. Reviewed-by: Hans de Goede Signed-off-by: Jacopo Mondi Signed-off-by: Hans de Goede --- Changes in v7: - Drop R-Car Gen4 mention from commit message Changes in v3: - New patch in v3 of this patch-series --- src/ipa/meson.build | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/ipa/meson.build b/src/ipa/meson.build index eb7846e47..c583c7efd 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -24,6 +24,16 @@ subdir('libipa') ipa_sign = files('ipa-sign.sh') +supported_ipas = { + 'ipu3': 'ipu3', + 'mali-c55': 'mali-c55', + 'rkisp1': 'rkisp1', + 'rpi/pisp': 'rpi/pisp', + 'rpi/vc4': 'rpi/vc4', + 'simple': 'simple', + 'vimc': 'vimc' +} + ipa_modules = get_option('ipas') # Tests require the vimc IPA, similar to vimc pipline-handler for their @@ -39,24 +49,34 @@ ipa_names = [] subdirs = [] foreach pipeline : pipelines - # The current implementation expects the IPA module name to match the - # pipeline name. - # \todo Make the IPA naming scheme more flexible. - if not ipa_modules.contains(pipeline) + # Make sure an IPA exists for the pipeline + if not supported_ipas.has_key(pipeline) continue endif - enabled_ipa_names += pipeline + + ipa = supported_ipas.get(pipeline) + + # Only build IPAs specified with '-Dipas' + if not ipa_modules.contains(ipa) + continue + endif + + # If enabled already do not add it twice + if enabled_ipa_names.contains(ipa) + continue + endif + enabled_ipa_names += ipa # Allow multi-level directory structuring for the IPAs if needed. - pipeline = pipeline.split('/')[0] - if pipeline in subdirs + ipa = ipa.split('/')[0] + if ipa in subdirs continue endif - subdirs += pipeline - subdir(pipeline) + subdirs += ipa + subdir(ipa) - # Don't reuse the pipeline variable below, the subdirectory may have + # Don't reuse the ipa variable below, the subdirectory may have # overwritten it. endforeach