From patchwork Wed Aug 12 18:49:07 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: 27762 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 59A82C32FE for ; Wed, 12 Aug 2026 18:49:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 76F0F682AC; Wed, 12 Aug 2026 20:49:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="CWaDlec5"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="BwWisoWU"; 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 6D4CD682B6 for ; Wed, 12 Aug 2026 20:49:25 +0200 (CEST) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67CI8j0g355332 for ; Wed, 12 Aug 2026 18:49:24 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=CWaDlec5ubW3bowpFQ2tpz2tpTc DEdUGArmVHiVeWOYNlUCLQpwAJx4rDfp15do0NgjLeSxCGoybRC5uVn7g5vXfrWK GOTC/rVeKfc1h+zhRESoAudYMvgpsJl+Bb0rZuRTMbL0J+pCdvbBy61NGBxD8h9x SJzdo1KRoxy+Xhv0L95eMJcNhzJ8WDjk0xofwN7geI4HEF/XA20Uj63SNMjsng4j mcNviTD2nlHw+jNRdZA7XIPNjhHMCHepmj7GwDwtzodM4qjdtWzCfEODJqQTOhGB QzPnJGgDl1E2hI/2nd3WVheaiaCWMRYNBYOvuoaSVeu564ImL2fnHgNPKvA== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g0hj2uqtq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 12 Aug 2026 18:49:24 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51bff5c7035so23836551cf.2 for ; Wed, 12 Aug 2026 11:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786560563; x=1787165363; 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=BwWisoWUmIRVgJ96bH1cs2zlXe/kepWlRAiKnYsxM21tXHUXqz5wkT3DdtN/hhIVhp xxJ7En61/EGcfr9SU4DlHcK4YDyIwXeLqxIMVIKmUJNldWa9Y3NCNSRbOVHlv0FxkRWT xYlhpQRz044aPufRp/8Z4S6ZfnxM4z1LMvAe2/ge17TUsidkgkveVAh8k312P9bN2IoB I4lGgWaTszkVS9kcH6BLgQvMY8Lm3V4WtkTWF88i4bzU7Sx5pyeS4Z7GFUIQwUboFTRl wpaDSbsJ+bBFo11J6KzQgRA7cfmeJ5g5eQAXpz2PJqjTnK4XHcZ8wgSQtJ0br8NCQKA8 +XFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786560563; x=1787165363; 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=Im9iGOp7yrx0e55ybqS7zdjC3AMyzlapgUJPBWwTwFMQeg74VEx4fL9qheyHH5BJwz 33Wpr1k0RoSFFKgauM/u9qv8oEda1h/Yl4N0XQxjxnUIk6Q7Bw6efXfXhV5n9z8c1VQq 5A4Vz3vS0Cvj+o2XuxwMCtUQA+GTA71RDCPLZsBMVJCBwiGs8RR0nPEH8U2lND4XXzRi fFntAFeYcJONVifsarXH6FGeMheulD9JjEJ2BUIdqAVQHZkZVY9wm0iKzPaOxeuvSG9S 1WuXC0L70fMb++B3d1Hry9wKS3e7VHZ6+XAv4krcVzQ4wYy0oKSPTUn+keaAE18wgM5Q Gtvw== X-Gm-Message-State: AOJu0Yyt8QuUBG/QMGYa43lwTfRpkkM1WuUiBdJFQDvs0Z0BXfoM8oVJ /l3p1cGAvKoQ6uxQ46xhEEy6dytKu6ahA3qDV1OSfUpwIaQdw3WsX3soWS5eT8SFOHiWoq4FvRX gqG5s/2NUIYH+RcSyLgBg5SEIzbKJRxEYMvk8vcLHMLjoNsOh0R77VhghJ/LDX+pMMuVrEZ0kyt KD0oX4QgKC X-Gm-Gg: AR+sD12fI+QenRB3FriyIEX4I6jYhBL2b9gHKIHb3KNerxW8nWFUEMYvhIY28Popvfj 6u/OxdJXv9QtQfjL0YgHVbLJDrzqfOwhINPO3jHaJlPjffoLMfJg89m9YgDDcmJx0/+kSpCZ6Si WY25krNinJEbRz/YIZsRjv9BQvLUlzlW8dcxUmuZ3iT+2FTr2D7sqRppRUSKKPTCgSPubVJQNeU WYAl4tAWMF1Kggo97Bkzio8fl6ChSoPgtpPxgPm2BqLsaYfHBWGCITOSBKJayWGa3V+NirIzPuz Ub/jNO2/3rrjFt3GznZZQFw93dROZZQQlGeqwb1KLmm09q95wNdahXQLJAs/ZejH8l9DMzqhAzJ Pdhdvtq04tr5M6h4zzbp6e3jPufOHX5RsZ1pAR1a/pkt37jpObSSVujy/+2lRLu7k8/GqeLK3V6 bT//MKVRFWfIAp8Ww= X-Received: by 2002:a05:622a:513:b0:51a:8dc5:bf89 with SMTP id d75a77b69052e-52d73c381f0mr3407391cf.5.1786560563491; Wed, 12 Aug 2026 11:49:23 -0700 (PDT) X-Received: by 2002:a05:622a:513:b0:51a:8dc5:bf89 with SMTP id d75a77b69052e-52d73c381f0mr3406941cf.5.1786560563009; Wed, 12 Aug 2026 11:49:23 -0700 (PDT) Received: from shalem (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a37f8a202fsm52348a12.15.2026.08.12.11.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 11:49:21 -0700 (PDT) From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Loic Poulain , Hans de Goede , Jacopo Mondi Subject: [PATCH v7 3/8] ipa: Allow pipelines to have differently named IPA Date: Wed, 12 Aug 2026 20:49:07 +0200 Message-ID: <20260812184912.287894-4-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260812184912.287894-1-johannes.goede@oss.qualcomm.com> References: <20260812184912.287894-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=a8EAM0SF c=1 sm=1 tr=0 ts=6a7cc034 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=xqWC_Br6kY4A:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=P1BnusSwAAAA:8 a=EUspDBNiAAAA:8 a=c6ydndUcIca2Pb-fbGsA:9 a=a_PwQJl-kcHnX1M80qC6:22 a=D0XLA9XvdZm18NrgonBM:22 X-Proofpoint-ORIG-GUID: 6DE5I7JoRZV6_UT8c-dLLehM-M5ralSU X-Proofpoint-GUID: 6DE5I7JoRZV6_UT8c-dLLehM-M5ralSU X-Proofpoint-Spam-Info: AW1haW4tMjYwODEyMDE1MSBTYWx0ZWRfX6gAJjxGjMpXJ HfczHUNAnLgjDDvnuCXnV5vh6M3eY1U9pGMPQsmSPwRu82ovOLaYytrZXgRMGshhmuMVQPWN0CW 6wG2aJgPJShYPHZt1Zgu0S3JxQskVyo= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODEyMDE1MSBTYWx0ZWRfX/ikvFhR0ThvQ UxwIdNgJeXdKEn5m/zMTHE6trM+v6SU/7p7eYrMjw3ZLy6PbueZ7wfnmJnVqu2IqPwCOmjXayqU +rP7jQRbXvVzg/0gWVQsbOlJoGnpugFqLenUWpL3T4zt9ImS4OyHH7S+EUhZwz65NMhVafiFYX/ weDz5MHu0k1mRHWc7y9imwMplm317AnGN/vBBV0A+ZWmGYW+ys1JN840vyeAJQ0mX+LocMLP3nq UpBWWNxBlHT3ryTTaxhJHUGVMNmkwRNQlQY1OEdRi7ltZ/pIB7bk1mNVik20Pq0wPKxt6+LQL63 nlZ3suCvV+b9iJodsLYoqzjLB3t5M9nNnnjWq+G3Fx3cj9Ezs82FECT6YK5loERv65XlCLtRNZy i/8uPqRxwMdb5xDeUkNpC2+eEYVifpN2ABhjZv9F2AVMMpoJgchBKsxpYwi+ygIcW3k2TtiSqpb P/7ph5KOmUBxtDQzkHw== 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-12_05,2026-08-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 adultscore=0 spamscore=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-2608120151 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