From patchwork Wed Apr 8 11:56:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 26503 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 2856DBDCBD for ; Wed, 8 Apr 2026 11:56:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DA21262E05; Wed, 8 Apr 2026 13:56:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="ZOXGJUKc"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="OVYxJS2n"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7396362CE6 for ; Wed, 8 Apr 2026 13:56:14 +0200 (CEST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 638B3JbF1314439 for ; Wed, 8 Apr 2026 11:56:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ZeFap/o+BzZok25lJzZc2bbQ1DHpfD2gW77I8yesimo=; b=ZOXGJUKcarFF+oZX wykiGGD09/0CATmbPr6GZFS4/4dHkZ6dAIHsB4YVy1rjWYg8BYlRm977CPtNtpuj GJTl7jcoezsZ1H+nwKGQqAKo3G6bEmNpdB9rhvZ5ju3OBcy5DwhgOfIZa0psmEmp jREiC9vtmJRLqHgbTuIxtw/+ZoVEOgLzJ9Ls8N8pSV2+KGmHYHWd16mK6224JBpS /FmfCEPoWlmQ8F6+UIzeiXgyyTFd2AhN8OgEsodxo9tAqVWVEfFF2LpNVThg/+dV jrY9I+R7lRoMfUyocaPvH8iz4GhNlOAWsAtJXlmjra6ljlHbMkEgB6IgeTq3J+Oy pAc/hA== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dd8d6k1ud-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 08 Apr 2026 11:56:12 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-50b4661881eso76311621cf.0 for ; Wed, 08 Apr 2026 04:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775649371; x=1776254171; 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; bh=ZeFap/o+BzZok25lJzZc2bbQ1DHpfD2gW77I8yesimo=; b=OVYxJS2nqNi0xtT9MZYgf2ldKHt/sNLf4CtR7zMvFzyv0aFwQFjjejP28KRwwZK1v6 ec/t8yTVzSbD9iceJN23wLZAXDCyHclpvetoG175yCh//VsTgdgMwLY/7Y+SluAZ5s7R 60DaOHxOnWkCiLyq0ZsSHZqRZRnCyr3LAUsu4kWOGk8/gDX8twh6pYQnQK+CTrNduoa1 JANhOMF8WKUtI092GtwuTVZpGU+2rgi7DZiaGH652zCMmbY/hPLaKuWykDEPun/pjb3a XVrdg3ux3YZZ5iP08/YP4qT2A/hS4M67o8VXV0UmckIVPVn9+52PBOgPS2fxH9QBjGGG 9WfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775649371; x=1776254171; 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; bh=ZeFap/o+BzZok25lJzZc2bbQ1DHpfD2gW77I8yesimo=; b=cB8Xno2BlFbK4l4Qt8vfYxrEDQT1P2BcSI0qWJ4q7d3P52NexsTPNdm9TTuJdVDozm f3cyQyswxsHxPZWSw+mKotnsSZkC4Ltw6ueofFumqVIl31jCFHClqboMnlpv9Vv+SihI V9tigWpgi03o/przi6oW42JskTRVc7xOK6Jswcq2hkCIxpVV0mYqktJidKLagHpk2bEy aCN2cK8mMR8tejIjm8UyNXKo9Ai68EJ+NtgFdrSEdVYv4ot9ZFikiasiWrs2peXgMStb 3nAW6JpdOULJ2+D57XyuyY9tkxKQ+8ISIY8JiRLR5BT/Ay/4ABfvh+6johVohQ89fDPf nS2A== X-Gm-Message-State: AOJu0YwmU0JK16Sh5JKpenUaljBaVylIFnGGZoV9GOnLcsmha/rKc0C8 Wz0DZPzZp/sQhqo8Cvu8lSIeyeBoNeatbcUVaSJN5okbcrinKWpRA79hZsldAd374zCRn0/dK1l 9eNm6o7xUrJQPsEe2wtFshX4Pb4fvhLZOgFihqOJaPBKAyUvwAhT31ozIdlGsLHhBWI9AtsSQ1h FGZ+Bl5s2M X-Gm-Gg: AeBDies0+MPgFVOYRdwaLBTGe+qslVw7Z/CotUjKgFsbrJQGD7DfF4GWU1SeskGFnxy mlZoLm+cfOlF83rPrj/yB6oxD0dDeuss+fPtwVi2aI35i4hC64fVJ+94SUsrwIUtjGpz5fbt62l RPGN8hWOFhdEJOlPFly6eo/HuaOReRUe9Kt9I7k+xZTeHolgN/Nja9/ffiqFg2yoSQHqwYvtFfS 2gDv9q6MAGwOFAsVyBvjs9tmt7Z0/APwZfSMT7USUsO6J0Z7wfRM3Pt8nG6O3a1hMp+JO5Renb9 ur+jraVbebCfBZ9xk7RjA0OyFoSA4Z1MZCByy23cluVbCrVvrnLYyLEVL51TmDb3zSrmXZmCcBH GKDWBZG812trMIud92VZmcPn94lpnoM4EreeAHULh4O1zOxY3cn7CzIlMBHHC0Ptb6f8Icyo7dR kVdvWc1TZqESPSqdPdvkuuFSw17dn6AGog X-Received: by 2002:ac8:7d11:0:b0:50d:65ec:a071 with SMTP id d75a77b69052e-50d65eca37cmr293008111cf.5.1775649371085; Wed, 08 Apr 2026 04:56:11 -0700 (PDT) X-Received: by 2002:ac8:7d11:0:b0:50d:65ec:a071 with SMTP id d75a77b69052e-50d65eca37cmr293007661cf.5.1775649370587; Wed, 08 Apr 2026 04:56:10 -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-b9c3cec6c1csm639102066b.39.2026.04.08.04.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 04:56:09 -0700 (PDT) From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Loic Poulain , Hans de Goede , Jacopo Mondi , Kieran Bingham , =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH v4 1/4] libcamera: ipa_manager: Create IPA by name Date: Wed, 8 Apr 2026 13:56:03 +0200 Message-ID: <20260408115606.12417-2-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> References: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 2sijeyNDIAqrBOpweLPofam0ihl77cUo X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA4MDExMCBTYWx0ZWRfX8bipDw8B3HZe JFxT7PXoFfehnT9Z71kv36wxTGiUxdMyErd/9qkAgrbhCn1lzN5UxZzNpD9E2Nh46tPyJKvVXd3 AOdSZVJUHwMQ9dUIIznEKZOzjZAeqj9OVZAhhHuGjR38txC3SeCPo27K+46IYSt7lgwirj3Yvrw Ehf3rJ0W5/ccV7879slqHuR/+bomN3/8qcW2aifjTa3OKTUTWS2Qmadp1kZq2QLcx3wCiZ8Fiuv 309uFwjAKPs/WeYPuBJ3o4OB2K8NHSo/EU9C92I4VjaA6KNRdiymDSjMfwq0UGBdv91wRnLUfN2 rAC9R5O3p/CwLuMOZAZEGJIh/t2YZ9N+HFUohnEq+NBnPyYcQebrg6SqSzSfNXRqMOPKfG1Sdjl LgUNUoj20f21VTtQWOV6n59vmVuVexpbs7TUVe4Hv6yeVzQIh1XE1lT76SMoinkmohJT6gWI5iH 9zKOtk0onpvR6QxcDKg== X-Authority-Analysis: v=2.4 cv=GN041ONK c=1 sm=1 tr=0 ts=69d6425c cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=P1BnusSwAAAA:8 a=EUspDBNiAAAA:8 a=TsfB_WN0WhEKZ-rE8qoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 a=D0XLA9XvdZm18NrgonBM:22 X-Proofpoint-GUID: 2sijeyNDIAqrBOpweLPofam0ihl77cUo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.51, FMLib:17.12.100.49 definitions=2026-04-08_03,2026-04-08_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 suspectscore=0 clxscore=1015 spamscore=0 adultscore=0 bulkscore=0 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604080110 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" Currently createIPA() / IPAManager::module() assume that there is a 1:1 relationship between pipeline handlers and IPAs and IPA matching is done based on matching the pipe to ipaModuleInfo.pipelineName[]. One way to allow using a single IPA with multiple pipelines would be to allow the IPA to declare itself compatible with more than one pipeline, turning ipaModuleInfo.pipelineName[] into e.g. a vector. But the way ipaModuleInfo is loaded as an ELF symbol requires it to be a simple flat C-struct. Instead, move the IPA creation procedure to be name-based, introducing an overload to IPAManager::createIPA(pipe, name, minVer, maxVer) that allows to specify the name of the IPA module to match. Pipeline handlers that wants to use their name as matching criteria can continue doing so using the already existing createIPA(pipe, minVer, maxVer) overload. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Tested-by: Niklas Söderlund Signed-off-by: Hans de Goede --- include/libcamera/internal/ipa_manager.h | 13 +++++++-- include/libcamera/internal/ipa_module.h | 4 +-- src/libcamera/ipa_manager.cpp | 34 +++++++++++++++++++----- src/libcamera/ipa_module.cpp | 12 ++++----- 4 files changed, 47 insertions(+), 16 deletions(-) diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h index f8ce78016..4c01e76f1 100644 --- a/include/libcamera/internal/ipa_manager.h +++ b/include/libcamera/internal/ipa_manager.h @@ -34,12 +34,13 @@ public: template static std::unique_ptr createIPA(PipelineHandler *pipe, + const char *name, uint32_t minVersion, uint32_t maxVersion) { CameraManager *cm = pipe->cameraManager(); IPAManager *self = cm->_d()->ipaManager(); - IPAModule *m = self->module(pipe, minVersion, maxVersion); + IPAModule *m = self->module(name, minVersion, maxVersion); if (!m) return nullptr; @@ -60,6 +61,14 @@ public: return proxy; } + template + static std::unique_ptr createIPA(PipelineHandler *pipe, + uint32_t minVersion, + uint32_t maxVersion) + { + return createIPA(pipe, pipe->name(), minVersion, maxVersion); + } + #if HAVE_IPA_PUBKEY static const PubKey &pubKey() { @@ -72,7 +81,7 @@ private: std::vector &files); unsigned int addDir(const char *libDir, unsigned int maxDepth = 0); - IPAModule *module(PipelineHandler *pipe, uint32_t minVersion, + IPAModule *module(const char *name, uint32_t minVersion, uint32_t maxVersion); bool isSignatureValid(IPAModule *ipa) const; diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h index 15f19492c..a0a53764e 100644 --- a/include/libcamera/internal/ipa_module.h +++ b/include/libcamera/internal/ipa_module.h @@ -36,8 +36,8 @@ public: IPAInterface *createInterface(); - bool match(PipelineHandler *pipe, - uint32_t minVersion, uint32_t maxVersion) const; + bool match(const char *name, uint32_t minVersion, + uint32_t maxVersion) const; protected: std::string logPrefix() const override; diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp index 35171d097..f62a4ee5f 100644 --- a/src/libcamera/ipa_manager.cpp +++ b/src/libcamera/ipa_manager.cpp @@ -247,15 +247,15 @@ unsigned int IPAManager::addDir(const char *libDir, unsigned int maxDepth) /** * \brief Retrieve an IPA module that matches a given pipeline handler - * \param[in] pipe The pipeline handler + * \param[in] name The IPA module string identifier * \param[in] minVersion Minimum acceptable version of IPA module * \param[in] maxVersion Maximum acceptable version of IPA module */ -IPAModule *IPAManager::module(PipelineHandler *pipe, uint32_t minVersion, +IPAModule *IPAManager::module(const char *name, uint32_t minVersion, uint32_t maxVersion) { for (const auto &module : modules_) { - if (module->match(pipe, minVersion, maxVersion)) + if (module->match(name, minVersion, maxVersion)) return module.get(); } @@ -263,12 +263,34 @@ IPAModule *IPAManager::module(PipelineHandler *pipe, uint32_t minVersion, } /** - * \fn IPAManager::createIPA() - * \brief Create an IPA proxy that matches a given pipeline handler - * \param[in] pipe The pipeline handler that wants a matching IPA proxy + * \fn IPAManager::createIPA(PipelineHandler *pipe, const char *ipaName, uint32_t minVersion, uint32_t maxVersion) + * \brief Create an IPA proxy that matches the requested name and version + * \param[in] pipe The pipeline handler that wants to create the IPA module + * \param[in] ipaName The IPA module name * \param[in] minVersion Minimum acceptable version of IPA module * \param[in] maxVersion Maximum acceptable version of IPA module * + * Create an IPA module using \a name as the matching identifier. This overload + * allows pipeline handlers to create an IPA module by specifying its name + * instead of relying on the fact that the IPA module matches the pipeline + * handler's one. + * + * \return A newly created IPA proxy, or nullptr if no matching IPA module is + * found or if the IPA proxy fails to initialize + */ + +/** + * \fn IPAManager::createIPA(PipelineHandler *pipe, uint32_t minVersion, uint32_t maxVersion) + * \brief Create an IPA proxy that matches the pipeline handler name and the + * requested version + * \param[in] pipe The pipeline handler that wants to create the IPA module + * \param[in] minVersion Minimum acceptable version of IPA module + * \param[in] maxVersion Maximum acceptable version of IPA module + * + * Create an IPA module using the pipeline handler name as the matching + * identifier. This overload allows pipeline handler to create an IPA module + * whose name matches the pipeline handler one. + * * \return A newly created IPA proxy, or nullptr if no matching IPA module is * found or if the IPA proxy fails to initialize */ diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp index e6ea61e44..0bd6f1462 100644 --- a/src/libcamera/ipa_module.cpp +++ b/src/libcamera/ipa_module.cpp @@ -463,21 +463,21 @@ IPAInterface *IPAModule::createInterface() /** * \brief Verify if the IPA module matches a given pipeline handler - * \param[in] pipe Pipeline handler to match with + * \param[in] name The IPA module name * \param[in] minVersion Minimum acceptable version of IPA module * \param[in] maxVersion Maximum acceptable version of IPA module * - * This function checks if this IPA module matches the \a pipe pipeline handler, + * This function checks if this IPA module matches the requested \a name * and the input version range. * - * \return True if the pipeline handler matches the IPA module, or false otherwise + * \return True if the IPA module matches, or false otherwise */ -bool IPAModule::match(PipelineHandler *pipe, - uint32_t minVersion, uint32_t maxVersion) const +bool IPAModule::match(const char *name, uint32_t minVersion, + uint32_t maxVersion) const { return info_.pipelineVersion >= minVersion && info_.pipelineVersion <= maxVersion && - !strcmp(info_.pipelineName, pipe->name()); + !strcmp(info_.name, name); } std::string IPAModule::logPrefix() const From patchwork Wed Apr 8 11:56:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 26504 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 A5011C32BB for ; Wed, 8 Apr 2026 11:56:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 83FB762DEE; Wed, 8 Apr 2026 13:56:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="MqR3vIfy"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="As/VrGby"; 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 2EE6E62DD4 for ; Wed, 8 Apr 2026 13:56:15 +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 638AwIMJ072568 for ; Wed, 8 Apr 2026 11:56:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= uxgktgJEbr0ayrA3gM4T0imubDWEGmXH66vsSiGkbRI=; b=MqR3vIfy7oxnkp5o zpjM2wK8C71USmMdl++qKLwT0OMycQ0L9ijm3V0aaK9zHkQffRY3U0WgZeC5szgA LMoHXDwRBGok+CQCGmicBdknpYP7B5BkCeulpx9yCYfFPxjJ642ZmSe2gMM4Lbeq vn7NkbFH80Er2qwEbI9z66WFkqVAeHxCeuUqKZWs8YDY0ir9wCEgL6LFe+KNvNwv YeyKsBtu7hUJVAXfsZ8M1GFgIIAhaQCnmqbfEq4NeDwYq/POXx+6aIkDrOmpbofP OiUnBwa6TowqJ6coQWUhUn3wTJ+R6JLIHYdOJJPIJKuGfg65dbPYjS9RV/cs75zB aotMsg== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dd7sxb4tg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 08 Apr 2026 11:56:13 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-50d5d1c2289so147121311cf.2 for ; Wed, 08 Apr 2026 04:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775649373; x=1776254173; 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; bh=uxgktgJEbr0ayrA3gM4T0imubDWEGmXH66vsSiGkbRI=; b=As/VrGbyI0vaN88S1frKqS30o3dJm0vBOL2nReIE9OBqAFzj6r43CM7nQbD0c43cf6 6lPMbQ+kBvcoBPVVVf+VGRPMYJMJOSA6qLxW+GbevjWj0it6W7p4vHKmMwbu37Qu4H1w 7XdMWxY9sT50wdl4n88ItROEyoIaFQGu+jXi6uHJ1pW3ZDujrjHhheqhMxn7MJarXm3o M64xpPjAUdk0tqUXfVG/shgXK6SszpR6b9gPG3lTclJbChLmoJZG9wWRcMJwbvVXmE31 ydznRs+MLPBZgjH5ey5lF89iSVijaTj/EJ7ecavjtoEd0s0lyS/TLiwKOv+vEg5ZxPZm frPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775649373; x=1776254173; 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; bh=uxgktgJEbr0ayrA3gM4T0imubDWEGmXH66vsSiGkbRI=; b=TaEFlaBa/2SkxFNAOXEa5//7AuWAe+GFdYTw+OP6znU0HCRPbHVGjHyXZZyZx1qELL rgNGyFyNaILG11eWZ7qjmzD0bfdUnPL5Id21XOlFV/Cp+xSvSIMqPuI3SspGhAhvp/qV fmFMThdOQYXhAxpP1xSxn/3B+K8s0HdcnjmRjYw0TgH9JxU3d7Pa+9jyKg9rlgnajRn0 D4Ej232tRnuyBx58czLT8hMOVExzzLCjLyZtHKls75qvyIe0b3ts197t3wwSZbwoqXqn WQAShIRX1xPdDDenjZS7L23YMCqAmSZq5pKcSu26XcpvJLaSYSB5zpfEytlVCHqufVO5 5Ziw== X-Gm-Message-State: AOJu0Yy0jl9XQjtZ8SVASFybtB/SwJ9CkBYoWDg7DlQSSShknJJpOOmL pY+2iOpKVD4eE6UiYZxOKMgALBcwIBnV43ncGrqr2JooDXXkL79AYA3qNon7J6HXeFKBOhI0IkP mQ0/ywzXmnAEt1rl7mq4rGWXv+0im6SDuwfZ7cIv+C84nXeDAkLU4oZ9UsXUslcBu978jWWxhDh YE3kh2hAbg X-Gm-Gg: AeBDiet+n+8lT8DCVdmf44uNMKgg77fc9+NipwMGpEA663/DZZUe7ivmNnRuIX/vAgk W6puxOaB7mEy7HIFziRzDZuKSTCkBG2fu7ciLtUIoxaLr8f7i8EsQNp/+5MncJaOtQzI7ifWlk5 +KVSiAR2+MGvcBikGucWku5/Si15TQRUHr+Vd3ZE+Nsrpv3ad3DD1ePx6wip6EDNq4yyXxKctNo fMEERqiV4gAwhKIvXB6GoVnwfu+j+S76PvKotz6bT2u2rDT9OqHa6JYZh0sa0GuLulruEXQBJ4r 3Ds3aPlyxWrj5viLNY6YamKH8cdfD63ehn+kwVUUP9eKPj12nrPGc6Z1IfGy9qjohBw24gk6PmK 7yXlyPLUVcdQm3auvpqWTqwxBCLMgo6wMaXMCZ7OJcGySNnZ9wM7FY9SAenhWzCfD698ontKREc b8JXVzUhnjqj0rndX0FAPSeKmsMVqj60R7 X-Received: by 2002:a05:622a:4c1a:b0:50d:a747:9e95 with SMTP id d75a77b69052e-50da747b349mr74684161cf.20.1775649372650; Wed, 08 Apr 2026 04:56:12 -0700 (PDT) X-Received: by 2002:a05:622a:4c1a:b0:50d:a747:9e95 with SMTP id d75a77b69052e-50da747b349mr74683741cf.20.1775649372193; Wed, 08 Apr 2026 04:56:12 -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-b9c3cec6c1csm639102066b.39.2026.04.08.04.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 04:56:11 -0700 (PDT) From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Loic Poulain , Hans de Goede , Jacopo Mondi , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= , Kieran Bingham Subject: [PATCH v4 2/4] ipa: ipa_module: Remove pipelineName Date: Wed, 8 Apr 2026 13:56:04 +0200 Message-ID: <20260408115606.12417-3-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> References: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=etfvCIpX c=1 sm=1 tr=0 ts=69d6425d cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=P1BnusSwAAAA:8 a=EUspDBNiAAAA:8 a=lvZftHTMWe99GEGio_gA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 a=D0XLA9XvdZm18NrgonBM:22 X-Proofpoint-ORIG-GUID: 3DXasSwzAlyDn8qfbWnpZG1f4SKBM3Sq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA4MDExMCBTYWx0ZWRfX949rAEOtjMdX LAFcwez37p+hBf8vNcDfc81xfyvzzmLXP0EscOR6lmDGmBIhrDUDxVEcUURR/KsrBHCngLwz53h udMJnIkgX4rXb8x8swO79ggDmmgnWr6tWkAKFy3h5LXZbUJd85bh++512ur3T7Tz1LpcqAae/b9 mAdoDILStUpoWMwwBRssRle3ItrgBgYRB78WNGnywdNUCjKVFNw5acuDO/Oxcz+1OGuqhxtc7xd 5daqPTmNsAyRGtvmxNAZSgo+XDMl5s2N6bQwuXtjUH+qKUUmkAp91MPx4IYk7uFBaQoDCrsvk7S 9uinQANzy9Gl5uhg1uAPSVFwSTaXxwumsc+wKi6FgAA8zRRniEBKzrZFddGu7MzlVRtXilFBodx U93OuY4JCHy3OFqun01++4hPbxwTwIq34VRizYdzjabU7na31XiIp4ADUPn6pKDL0QlAHhdBe5y Q56ObG72DLyr8DeNEpQ== X-Proofpoint-GUID: 3DXasSwzAlyDn8qfbWnpZG1f4SKBM3Sq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.51, FMLib:17.12.100.49 definitions=2026-04-08_03,2026-04-08_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 bulkscore=0 impostorscore=0 suspectscore=0 spamscore=0 clxscore=1015 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604080110 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 All the IPA modules declare a pipelineName that is identical to their name. As we now support creating IPAs by name (either explicitly provided by the pipeline handlers or by using the pipeline name), the duplicated information in IPAModuleInfo is redundant. Remove it. Signed-off-by: Jacopo Mondi Reviewed-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- include/libcamera/ipa/ipa_module_info.h | 1 - src/ipa/ipu3/ipu3.cpp | 1 - src/ipa/mali-c55/mali-c55.cpp | 1 - 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_module.cpp | 15 ++++++--------- test/ipa/ipa_module_test.cpp | 3 --- 10 files changed, 6 insertions(+), 20 deletions(-) diff --git a/include/libcamera/ipa/ipa_module_info.h b/include/libcamera/ipa/ipa_module_info.h index 3507a6d76..436ec82d7 100644 --- a/include/libcamera/ipa/ipa_module_info.h +++ b/include/libcamera/ipa/ipa_module_info.h @@ -16,7 +16,6 @@ namespace libcamera { struct IPAModuleInfo { int moduleAPIVersion; uint32_t pipelineVersion; - char pipelineName[256]; char name[256]; } __attribute__((packed)); diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 92f5bd072..8d48f6bf0 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -672,7 +672,6 @@ const struct IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 1, "ipu3", - "ipu3", }; /** diff --git a/src/ipa/mali-c55/mali-c55.cpp b/src/ipa/mali-c55/mali-c55.cpp index fd5c9563d..07f892b9f 100644 --- a/src/ipa/mali-c55/mali-c55.cpp +++ b/src/ipa/mali-c55/mali-c55.cpp @@ -380,7 +380,6 @@ const struct IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 1, "mali-c55", - "mali-c55", }; IPAInterface *ipaCreate() diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 373a343bd..adafe7569 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -481,7 +481,6 @@ const struct IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 1, "rkisp1", - "rkisp1", }; IPAInterface *ipaCreate() diff --git a/src/ipa/rpi/pisp/pisp.cpp b/src/ipa/rpi/pisp/pisp.cpp index de2a6afeb..975d8bfdf 100644 --- a/src/ipa/rpi/pisp/pisp.cpp +++ b/src/ipa/rpi/pisp/pisp.cpp @@ -1145,7 +1145,6 @@ const IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 1, "rpi/pisp", - "rpi/pisp", }; IPAInterface *ipaCreate() diff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp index b6ca44e7a..f30eee7ff 100644 --- a/src/ipa/rpi/vc4/vc4.cpp +++ b/src/ipa/rpi/vc4/vc4.cpp @@ -633,7 +633,6 @@ const struct IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 1, "rpi/vc4", - "rpi/vc4", }; IPAInterface *ipaCreate() diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index 7d25bdd26..66f2c27ff 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -343,7 +343,6 @@ const struct IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 0, "simple", - "simple", }; IPAInterface *ipaCreate() diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp index a1351a0f4..822e00aff 100644 --- a/src/ipa/vimc/vimc.cpp +++ b/src/ipa/vimc/vimc.cpp @@ -202,7 +202,6 @@ const struct IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 0, "vimc", - "vimc", }; IPAInterface *ipaCreate() diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp index 0bd6f1462..53cea6b18 100644 --- a/src/libcamera/ipa_module.cpp +++ b/src/libcamera/ipa_module.cpp @@ -215,18 +215,15 @@ Span elfLoadSymbol(Span elf, const char *symbol) * \var IPAModuleInfo::pipelineVersion * \brief The pipeline handler version that the IPA module is for * - * \var IPAModuleInfo::pipelineName - * \brief The name of the pipeline handler that the IPA module is for - * - * This name is used to match a pipeline handler with the module. - * * \var IPAModuleInfo::name * \brief The name of the IPA module * - * The name may be used to build file system paths to IPA-specific resources. - * It shall only contain printable characters, and may not contain '*', '?' or - * '\'. For IPA modules included in libcamera, it shall match the directory of - * the IPA module in the source tree. + * This name is used to match a the IPA module. + * + * The name may also be used to build file system paths to IPA-specific + * resources. It shall only contain printable characters, and may not contain + * '*', '?' or '\'. For IPA modules included in libcamera, it shall match the + * directory of the IPA module in the source tree. * * \todo Allow user to choose to isolate open source IPAs */ diff --git a/test/ipa/ipa_module_test.cpp b/test/ipa/ipa_module_test.cpp index 1c97da324..af71c3285 100644 --- a/test/ipa/ipa_module_test.cpp +++ b/test/ipa/ipa_module_test.cpp @@ -37,12 +37,10 @@ protected: cerr << "IPA module information mismatch: expected:" << endl << "moduleAPIVersion = " << testInfo.moduleAPIVersion << endl << "pipelineVersion = " << testInfo.pipelineVersion << endl - << "pipelineName = " << testInfo.pipelineName << endl << "name = " << testInfo.name << "got: " << endl << "moduleAPIVersion = " << info.moduleAPIVersion << endl << "pipelineVersion = " << info.pipelineVersion << endl - << "pipelineName = " << info.pipelineName << endl << "name = " << info.name << endl; } @@ -58,7 +56,6 @@ protected: IPA_MODULE_API_VERSION, 0, "vimc", - "vimc", }; count += runTest("src/ipa/vimc/ipa_vimc.so", testInfo); From patchwork Wed Apr 8 11:56:05 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: 26505 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 B5A90BDCBD for ; Wed, 8 Apr 2026 11:56:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3110A62E0C; Wed, 8 Apr 2026 13:56:19 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="OQE1T4O+"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="b5PnMRzI"; 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 24D9B62CE6 for ; Wed, 8 Apr 2026 13:56:17 +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 638B1VIL071736 for ; Wed, 8 Apr 2026 11:56:16 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=MBq4Dj3cjpd I3SjIil7Z0HBw0N3mytKcqnaYZBc7uP4=; b=OQE1T4O+e68dl5E/R/hQVIqJUHD hAiaCUSAyE/TUvMBm0BL5b1L9+qRdft7f9FLqGe2Ipt3fhHMN8ynCPlGNFsAod+v QksSH8OlSa84NjyxEYCKk51fcEASMo46zpt9xDC8TwvO/GXeC+8sCAXFIRJPMSeW 8Nv+uDUZ+p7NrzmssYjUwZgvQf73Ut405eWVxAgDWGDSyb1dtW6O4ucIYrTahST3 ztKFjlV1se2g77dKuemusDNkQ4QJkrjvFBkc/2kd3iC+fRzJvdaf172BT3faj9rW KmTXaLpF7v28LCGq4+juY59tJzJxUb+A4dBAAl36utDY1bl1qOpgT2l8aKg== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dd7sxb4tk-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 08 Apr 2026 11:56:15 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-50d8ed08aa4so101232241cf.3 for ; Wed, 08 Apr 2026 04:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775649375; x=1776254175; 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; bh=MBq4Dj3cjpdI3SjIil7Z0HBw0N3mytKcqnaYZBc7uP4=; b=b5PnMRzIOHJgqOhGgAzdiBfxZauxcU5O9PGpOgi8EHzkkllAfOIpW2zgxL8yjy1OZj ij13lrUbxxQijBo385zePbqrgfZpswJWWaF8jGQtCQHNhJWr7KuI+YBgdcWQPjropaui TC35O/xO/Z9oFqy34ahIAsZGQOf9vza5dNWyt1IzgK2rBRo9aF4SPSs7KjUPjRr0rzI9 kt8f2alaLYwXODqwsFCbyMY20T0MfxU3jwmggSZcWrUTiutbyKwW3SJvCTS6WxJeBjxb iPPMBJIEQO1M5IR6zxRpeS+wOV8AdVugPU1z4nsxVp9epk9nGFp3epI15VwX9qRl5Gb4 BcMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775649375; x=1776254175; 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; bh=MBq4Dj3cjpdI3SjIil7Z0HBw0N3mytKcqnaYZBc7uP4=; b=TQSF+QhdOzfT4sCz0EW2CtJTqT3pIQYApbiIOlDwrgmkJzqn4JMv/BhdVy6FEZkPUr ZNza7yhveTuq3ldPQDcw0gM50Soei/BNFpMGaRDuzke6590Mof3vjW5IFtZfF56Vo5Y4 Y0duZEuU8j2yFH/nqTwndTW7ObTxpEAwoLDqolQrxErS363IS+sFf3n3kioC/gSpXl3Y 3V7p0RhOJ95MY9RUZMLNZMQ2xTYt9ENYELepNzEc83JRZUOCH2XNJSva0fhH7qxXcb4P gFPyXxowO5pJ2nIHoTo6EvMg+GOacY2aHb/YUbo8Xcje5Eul+QpDjsthfvfR8tbf+Cox dhqQ== X-Gm-Message-State: AOJu0Yw5/0h+p0RhgmyICfXa2fmO03a9Lg5HBX75Wr3H+4AI3F0tHMn9 uKFvtKAqPxAhnrFge57QJsIoXjkHnfMxH1A0vlSdDL/Tbvte5rOCfd54rAbwy30bmN/QTddDitn YpSAPqV3e9dcD6+bIbGEA0MZTFuMzq+FXCzphGmns1x8cQMfmR4Tcqq7Ko88UvH/KJASv3DGuqP hleOnXfJyo X-Gm-Gg: AeBDievlbd5/FljQimkO3kAlPCC1ly+vBXzq4eKK6EqJPCziWeerVlZR/JCJaJD2yCK rbHG5+qe8iv5aAj0pQqmFgvjfclV9x2TyU1oypSuZ+YPiC1HriJdUDhqVpwE5uJNRmIeaYq/++I g9VbORN3dLsfzoz3UiG0kGUzEzbv5K8AhiOK2MuqLpP+KuOKTiDz5eALrOLKJXtwZXq4D+bs9It zHtaBWQm2VoJEGX2n+/K3Wb1YwB6DQOZXmJDWW1CRKNu8FADrUcyJ0qr/ivF27Fg8n+SuMsj5y0 ZqlkqRNLDEvCSOjqtO8w9oYL7umzNhKZcQcRsrBL9DToYWFz+a0R5Cl4bVT1WOcbQXCgcDxu8SY jdwApTPu6xjAa8rXV/plL+gq/aSstmszhaWKKFjFMvErDinmQuVjPVysFMV5bRw3jDe63PhpRRd FMuIzzQ8DAmjMVrj212zx3VT/0mIniTG67 X-Received: by 2002:ac8:5f0f:0:b0:50d:a5e8:39f5 with SMTP id d75a77b69052e-50da5e84231mr82136911cf.27.1775649374787; Wed, 08 Apr 2026 04:56:14 -0700 (PDT) X-Received: by 2002:ac8:5f0f:0:b0:50d:a5e8:39f5 with SMTP id d75a77b69052e-50da5e84231mr82136481cf.27.1775649374266; Wed, 08 Apr 2026 04:56:14 -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-b9c3cec6c1csm639102066b.39.2026.04.08.04.56.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 04:56:12 -0700 (PDT) From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Loic Poulain , Hans de Goede , Jacopo Mondi Subject: [PATCH v4 3/4] ipa: Allow pipelines to have differently named IPA Date: Wed, 8 Apr 2026 13:56:05 +0200 Message-ID: <20260408115606.12417-4-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> References: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=etfvCIpX c=1 sm=1 tr=0 ts=69d6425f cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA: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=uxP6HrT_eTzRwkO_Te1X:22 a=D0XLA9XvdZm18NrgonBM:22 X-Proofpoint-ORIG-GUID: Ldz5Dn8t24hHiPBmYCBClK9ozrHLJvl7 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA4MDExMCBTYWx0ZWRfX+LeT54gjomql z+A7n8eBiuzf39TsAdHrhhiKn3HRHq2zpgveLXcGcWo1j0CQJvELC0yZEfLw9G2hLAveZKfrDrG cMvZwuvisblDmWdSvRSBYus3rDMYB4V1WmPYY9hDqQxtTUleXpSqLmfbaaSnP8ElbX8MH+GUrvu KD7tVzdXC3z7b8l3hUzdKruNE2hZxPPe8t/So/vxhCgJWjaJb6t9MqxVC8QN9lVmCUDGBfsjkG4 TuGIrm7wlIFqSRkkTgOAAIhZKRi4+QhoWsdyG5l8URgULzUJa60lUVhuMDtXpdz/zNty2oXymJO 5oi1IhLbAtF+Ncf0v+fSyonXJ7wHSjhZSjc+KehE+fU999Ln2Uog3iipphO875w9DDA8fdOtxZj AdB+GB1Lb79/stJzjqRvhFZtL0BYO9nMlHUAMyxgeYgtLH+EvrxjNa1ZAqXLgjnN0NHdzzV+pWu RbzXSzKglBiJtuSD87A== X-Proofpoint-GUID: Ldz5Dn8t24hHiPBmYCBClK9ozrHLJvl7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.51, FMLib:17.12.100.49 definitions=2026-04-08_03,2026-04-08_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 bulkscore=0 impostorscore=0 suspectscore=0 spamscore=0 clxscore=1015 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604080110 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. Signed-off-by: Jacopo Mondi Reviewed-by: Hans de Goede 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 From patchwork Wed Apr 8 11:56:06 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: 26506 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 1AD66C32BB for ; Wed, 8 Apr 2026 11:56:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C53AA62E05; Wed, 8 Apr 2026 13:56:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="k3+0qlPa"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="DcI6zeF8"; 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 1109062DDA for ; Wed, 8 Apr 2026 13:56:17 +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 6387EfVX2860432 for ; Wed, 8 Apr 2026 11:56:16 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=OwoxZxfVEBI rQvfWfiK8iI5loWWhQzz5t7067V/Ma+A=; b=k3+0qlPaVfPKLisO9qK6PucWkeg 3guEu0YZ0PjgXRYJXwhxWVGRznnwJQEXOGBfCAT5Vqjt2lUuDj2Lg0WY7lmwW5W7 hT5dT97zIOotfsjik8MxT0JydLVYSsL189Z2qGZwES6YLh+ZM1FVg/BKCdvf6+UG Zr0SLxHIEsk6MeUdAVyTZRQ5I8ofNv3ZcN4fPVWI93cmCGPZ8zhr2YSJXhXt5tE2 q//mI7pwEB5lttvlBzlwQpktwf5Ajhx+OictmHOaco9nhmj4auJovpNC89QZor3/ rqFHXP/yXNY5SxkVO9dMKV0aLXfjBSPNZXzN67g5NWy9MtVURBeHnMmDuLA== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ddad8tqfh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 08 Apr 2026 11:56:16 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-50d8ed08aa4so101232961cf.3 for ; Wed, 08 Apr 2026 04:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775649376; x=1776254176; 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; bh=OwoxZxfVEBIrQvfWfiK8iI5loWWhQzz5t7067V/Ma+A=; b=DcI6zeF8s0D0yrio+PH9J/XWPToD/jo7LFLVLr8PKIjWAjQJODCAycxigSkG0VBR9w WCmLCK4WfhwtF1oHm2XZfJMvWXVXydinDZYzGbkJE7JA/uTc8necjuupKsqHYmwhPB96 GGgn6eUfm7kOk4hHUO2unI/Ef6RJD/aUvxA183jCv0GghxLziyRuRKC/ORB5rBrDYl6d 3uL8b5P6hGznyg/9gp6ymdMaRYH5Fht6Mp/jCTJm+Nv0/tO7AsHogLp5+D5yBpgWdcVE qdBUwIHC142Dq5IDptHdjmsF9e/kXYWuTWV4AwNjyx6v/j1osT8Li9+Xs9dpogDh5Q99 OBOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775649376; x=1776254176; 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; bh=OwoxZxfVEBIrQvfWfiK8iI5loWWhQzz5t7067V/Ma+A=; b=sMtpkS4wA4K52sOQqz+ogqSMLDGL9Cf0iPfC+InTkErAK0heDZ8zET5I/zUa35aNan ZmBw2Ne6Dtp08qWKYmJQDAM2r1OwzDxVCp49zM4uhlG/u0QB5Pq2sfwdpaptyievOtfU jQM28FeY+LjgkkqPQsN9zonUsrISiqMwIZph1Okvxxgbqxn01SZ10NjTNI50LkiHKrGO PhwgFRtCCGVeWayMtlpnp8IOkSVaF2w0K2ADB0yQBvVrxzpSeFNLZeP4m3BSVPaibjuL efD/G0xuKpB8oNyBiDbnskOICSMAybLf/tx7xV1KaZD2amc9ytEb1YPkIr/nVf3TfCg6 NFpQ== X-Gm-Message-State: AOJu0YwgDvmxI3K7MI43EDOClrgyzmh+bjpWT0qZRqxeXDXcCpFXWiN/ VXWgQZMSIKz1YL78cqXS0z39UGifDObyltnJnLel7QkFZ+iMMGF3A0TpBWH0kWHRHof8eVsFY3s fMwuInV7sKqQriN9VICxGYIn/uxnIdgUA0x1KP6ssMD8muysbkTIdc+sBPBJ+lgKH8XHrxMQFpV fAb5ECbPYi X-Gm-Gg: AeBDievJA5Ulb4Q0wim4TmSwasFVpj066RqL86vFILrJAYrzpAemeX3Zra5qM83u06J zii7eFtZTgwhq6e782USvHVj878deZ6Gmwc9Cn5hKj36jpBnJYQlL8ycBR65YrJItR7x4zXu0AW YAw3rjOnZHEmWYeLMxvCkaT/tKGmo1gkgsK7Fo5unelvor+X1phTRp8U38m18MkuTPv99vV5Ev8 MnhydKRAZfqf3n3EQItSXqlyxpVea/N1XjgQrVRngjVUiXd5bqTDzoC81Knf/btvmBLVc4rPSLL 1/8Qgd8vXSnkCG/Nqqse6o/xbISwqd5UTGV2iRuWP3gUnFA6UARHT/SPuPxgITtGOt7uDENLRlS O48G8KtR5X/y5HsuYKH1cxU4ZHMo2Of/PrSv7ysH6ThSlZ60ElcMgqCafI9ZEXVyxXjxy2IyS0x mbQPpRt1tnq9mfpNE+2roZD1C3x96ZvH0I X-Received: by 2002:ac8:5f8e:0:b0:509:456e:a179 with SMTP id d75a77b69052e-50d62b07434mr287345511cf.64.1775649375867; Wed, 08 Apr 2026 04:56:15 -0700 (PDT) X-Received: by 2002:ac8:5f8e:0:b0:509:456e:a179 with SMTP id d75a77b69052e-50d62b07434mr287345271cf.64.1775649375514; Wed, 08 Apr 2026 04:56:15 -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-b9c3cec6c1csm639102066b.39.2026.04.08.04.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 04:56:14 -0700 (PDT) From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Loic Poulain , Hans de Goede Subject: [PATCH v4 4/4] libcamera: software_isp: Explicitly load "simple" IPA Date: Wed, 8 Apr 2026 13:56:06 +0200 Message-ID: <20260408115606.12417-5-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> References: <20260408115606.12417-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: xJq56W7uN6UqlCfKdyduuEICs6oJx9qt X-Proofpoint-GUID: xJq56W7uN6UqlCfKdyduuEICs6oJx9qt X-Authority-Analysis: v=2.4 cv=EoDiaycA c=1 sm=1 tr=0 ts=69d64260 cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=_AsD4-4jnHjeG7-VbxEA:9 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA4MDExMCBTYWx0ZWRfX7Z/fdf5FKuKt S6VpEt31Wej9KmgFtLDQ729SUQ+McZIhPE/IWQVVNA6EcHQcibg+CP7Cfbqgb5xYIiivVjP4UI5 L1dMy/nUvNIYytwytmeyP8fBIwyKuvrk/oMFkNk1neCE/Cbbb77yUh1EMtza9u7X1XTPJIdcK5G nJeUdzU8/HWp+RD8dIfRcZ+cNFlpvoC+6Xo0yjDpVnPMNx9r6Db3GI+/MJzVOJMfcL7Qv3niGvG 2BaADLKvhq8iwI9TxxvuYt+i8knXsBIEX42mvCJXJaA7kek6fsB4SIxbwaQjMwM3T2UY0ajaCDu BEJ1Qv9GlRZ587sdQv/P/uJi04NucS9JvLVKIFGGzR5BjDsntZzgc/k+O0J7CZoXYwyGh4+ZCEc zBbNItKWpbHb1pt4/2uPTVU63Edd4AYnMXz0+uq26d9HYtEUq7HyWyQZlK2j87kmupn6sDXmPB6 5pSLot/u1/bGPyXIKww== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.51, FMLib:17.12.100.49 definitions=2026-04-08_03,2026-04-08_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 spamscore=0 clxscore=1015 bulkscore=0 malwarescore=0 impostorscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604080110 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" Explicitly specify the "simple" IPA name when loading the IPA so that the softISP can be used with other pipeline-handlers too. Signed-off-by: Hans de Goede --- src/libcamera/software_isp/software_isp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index 60228369f..99e4635b3 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -127,7 +127,7 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor, debayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady); debayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady); - ipa_ = IPAManager::createIPA(pipe, 0, 0); + ipa_ = IPAManager::createIPA(pipe, "simple", 0, 0); if (!ipa_) { LOG(SoftwareIsp, Error) << "Creating IPA for software ISP failed";