From patchwork Tue Jul 28 17:24:45 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: 27516 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 303C1BE080 for ; Tue, 28 Jul 2026 17:25:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AE44567FB4; Tue, 28 Jul 2026 19:25:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="ZeYGh9rE"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="dxnL1Rkz"; 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 17EA267FA1 for ; Tue, 28 Jul 2026 19:24:55 +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 66SEcesR3063320 for ; Tue, 28 Jul 2026 17:24:55 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=p4qhMs83tjW e8RfjgkHMORxmA1XMNp5mXSZub0Q/x6Q=; b=ZeYGh9rE+k+7Fu3UXPKYMtK0zKo czO5OVqkzWPuo1jMh7qSoY+k7VlagIzhLel0AnIaa+f5DHXZkjlqm0wHZt/f1c02 QsxP3CA/85dXkA3Ju6nqfuVI4kgaEwbcJL53O2WOVugB4b8C5ozSc/58qMjVYxwv n/1f0wqbS+vPnqYyYCVO5DRb3OWwHSrL6smUMIEjRzMB5oyQ6k8q0hdtz+TRHCG0 PFLZzdhGpmJdA9RK8/a4wuSbvjtztOv03xSFQBNMLg7Ekqq/+BFliOf2+7N1iOVR LI/7jIFvkl/tiS1Cebpf5T6Kq5Ws6iSBx7W7mr3fiZjQ+AOS+Xs1j6BpNwA== 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 4fpuyg9x5a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 28 Jul 2026 17:24:54 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51c1eb52e1fso1588711cf.0 for ; Tue, 28 Jul 2026 10:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785259494; x=1785864294; 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=p4qhMs83tjWe8RfjgkHMORxmA1XMNp5mXSZub0Q/x6Q=; b=dxnL1RkzlSMlMycyAl1bU0A/HhSo3QV+LTOMxCqwliv6DusVlpX4wQKn7jYnmWWy7K PHN/klPM514GQzIuKHE+yFko3xz2faSCNGNr9MdWQwVmSR7myGQj6dDUvlWNYDUsPZjP Nd4OX3J9E8HkVQeFC6V3d1mupLury3lCmtl34UCxdTFzxpry9RAqm5kyGjPBzk8Zpdz7 SX0YUJMLi8ILAiMfKQdqwsnbRAzWh/7xelYXf3Du0DQptFQjcRfJN+VJj/k0aD9rU8rq ypdNSWjbEv1LVFOCTAgmhTj9kU0ry00iBxcNetWQ7mJ+adf877vC/MkGcZ/edKf+77/Y jsLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785259494; x=1785864294; 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=p4qhMs83tjWe8RfjgkHMORxmA1XMNp5mXSZub0Q/x6Q=; b=eFwWbKFQvshN4FL0o7lGP3tS/euJyClpKTLvQ58SEgBkbvrBLoj2gEjIXKgVU71zsV N0xuVlDBnNfOun+BnpxkAV7WWuR2n0XNzcIgVPufj06SQIS0afQseRu17kdvs8pjm+Ej upboQUXrTQFBlz/EvwJwGjYyu0+FlEiQANsfvXqf/MVnH8sQlHpHaK+k5rShnPECq3Ow Ib+7Ksoyi537YkNChr1Jl6z3p57I8nysdRvFUxRy+bZut84blXsXjOcIUci5TcbvtvzN k1laM+sHr9jMKWrHNtdQyCAzcDiPTnVtw+OO8JyFF6Etd7kJoD7xOpOY5bpmQ++NGqMQ yygA== X-Gm-Message-State: AOJu0YxJwSMx3yvxqko6QG64vwx7HngxS9Ez8AKJ5TIBYzof2B8I2Qjr hMTRHfe6qz4Q0dtYD9+BljCXBvIkSu+sdBP9e0mzWyYSxfxguDdNdoq0KZICQw0dcuQDRzcs5mE OJaXCpxjKsr3kcOroA3r7kjUQPo56Zod3lD0Q1tiAs5EAFrdeLKlc3Ulh0Amb9JOEVKkCUbKRmI 9ANzvRi9k7 X-Gm-Gg: AR+sD127muaG6cGEtEkJZg1SK6atsWdLMruD6QpX2MdXQmtIU/yYFgJ7GcAps+9lqmC VaR9CjI4ApWMOxXVuH9lWg3d/65M4ohW5azubV96PuJU24X54fexkn4KffsEiltcrZ2f9u+cBU4 jpFpd0X/2W5kBKjkzSnIcKonnOiwEdDafru/ohFFaC/jbMG5Qt7BH9Tq1VX6qDnvOMy9qGOj+IG 0mzPxcpUtTX+2lHvH/hWwHa0+lwhQhSg9vWmNxKxywwH/4IGJ/oBRcBBWV0wcl9Jbm9dZ+1BkhQ 7lq6++10kQNWxmim71+cyI0UcjVOyGpPAYr/7O0S6sJ8fTXkddHJ1wSy1Fswcms7q99ZwSB/m2T 5pNDiCjmx5rgOqgpamQZJlSPNnHNJnvhhgVTrvT8s6nOspZE0dXRD9BjFPv4vJ9+WtOmiXm6atJ Ay26D6CblH8c8= X-Received: by 2002:a05:622a:1903:b0:51a:8c86:bd44 with SMTP id d75a77b69052e-529d714760amr30821321cf.65.1785259494018; Tue, 28 Jul 2026 10:24:54 -0700 (PDT) X-Received: by 2002:a05:622a:1903:b0:51a:8c86:bd44 with SMTP id d75a77b69052e-529d714760amr30820941cf.65.1785259493359; Tue, 28 Jul 2026 10:24:53 -0700 (PDT) Received: from t14s (2001-1c00-0c32-7800-07d4-cca3-ec08-7ac7.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:7d4:cca3:ec08:7ac7]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c1f83fabcdasm11136466b.48.2026.07.28.10.24.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 10:24:52 -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 v6 3/5] ipa: Allow pipelines to have differently named IPA Date: Tue, 28 Jul 2026 19:24:45 +0200 Message-ID: <20260728172447.68551-4-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260728172447.68551-1-johannes.goede@oss.qualcomm.com> References: <20260728172447.68551-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-GUID: aaXTkZFYBUJKVq-IP4mz2nOgRhyb-fwh X-Proofpoint-ORIG-GUID: aaXTkZFYBUJKVq-IP4mz2nOgRhyb-fwh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI4MDE1MyBTYWx0ZWRfX1nJoUy4V9dX3 wZLglKGNRu/lm8UFHVFsRWU3JTkBEKLkXdoHAM5Q7Z6JEL5JJUb1O3dkDttGJ1DLmka+r+JJJJx KA/rXY1dKRepMPPpJil2yRuNNSAsr/FMcG50VQHLa6QgYmoBVNriVNqL4+W+wZD+2e9arloAOMD ri5IQp27ut8kv2fpvNWpU7FQDIdYcXvZs8YqZifm01CPhhL+fO19HYN5wE/Vp8gI/mUGBC/Yepa 1muGqlWyc2u0i2xwvHT+F66Sr2UgQ47nF8/LHEbG0VCBdT98uyMtTjRwc8LNipT8KhXqMXf8MvD PgIyhMgD6fJdA8BaLSRszjhCI3PXembVC0Z7lz1TDXMAhT/S7BYBfFdL3zf8HeYlZlG5ApsmPBt ROpL43999ulj7mqK7NhQlBUU1u9gYIyqWjxVX4zCc8dg1db6qCwB+He1cfJes/xvVfem5mQUyLV md2+lJ7XpxhQIdjtgqw== X-Authority-Analysis: v=2.4 cv=aoWCzyZV c=1 sm=1 tr=0 ts=6a68e5e6 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=xqWC_Br6kY4A:10 a=RAioF0-LDSMA: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-Spam-Info: AW1haW4tMjYwNzI4MDE1MyBTYWx0ZWRfXx6WekFbRg43d hUHgbVjCiTmskT6P5zDFW/UwvKmv391Y9U2XC4TQzwpcfvQV9aOg8jXBSbdZnhMgyzsoOpwGbRF Xq5tNOFFgdJiitsymaDXDLBSrsJp18U= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.134, FMLib:17.12.100.49 definitions=2026-07-28_04,2026-07-28_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 spamscore=0 bulkscore=0 adultscore=0 malwarescore=0 impostorscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607280153 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. Likewise, the forthcoming R-Car Gen4 support uses the RkISP1 IPA and at the moment would require building the 'rkisp1' pipeline in to have the IPA module available. 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 --- 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