Patch Detail
Show a patch.
GET /api/patches/18549/?format=api
{ "id": 18549, "url": "https://patchwork.libcamera.org/api/patches/18549/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18549/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20230426131057.21550-2-naush@raspberrypi.com>", "date": "2023-04-26T13:10:45", "name": "[libcamera-devel,01/13] meson: ipa: Add mapping for pipeline handler to mojom interface file", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5c60bac1b2f0f1f055f9c7380ecc02d9e37d8087", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18549/mbox/", "series": [ { "id": 3847, "url": "https://patchwork.libcamera.org/api/series/3847/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3847", "date": "2023-04-26T13:10:44", "name": "Raspberry Pi: Code refactoring", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3847/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18549/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18549/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7A3F0BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 Apr 2023 13:13:15 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 07BFA627E3;\n\tWed, 26 Apr 2023 15:13:14 +0200 (CEST)", "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8AA94627D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Apr 2023 15:13:11 +0200 (CEST)", "by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-3f196e8e2c6so52626715e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Apr 2023 06:13:11 -0700 (PDT)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tk5-20020adff5c5000000b002f103ca90cdsm15780949wrp.101.2023.04.26.06.13.10\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Apr 2023 06:13:10 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682514794;\n\tbh=+OAnu+Axde/BMS9n1Q6b1MB3Ox2AkYx1tR/z6tYFUkw=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=b/44w4q6+7Qt/tgFmmnN5k2/qS5Cw93bMm7OmGSpuQiI+n27AqTHK4KcAN4sttsEQ\n\t2py5yqIYFH/n8cPPQZnXzHLRENT8SSzfj69x4NkfHLVn4675EwifJilXQiB3u8+dd+\n\tuZvZ7E4QLGvzCX2JJ7dt8fEmEeMsZ7b9olz3roHU09ceY9+zO7+JfHBKUCEMNFsswx\n\tW2TMYyX3ZtGhrAsnsrJdr7GHwUoFsEqocRBmSEcxCJPWb9dgIFgoBa1oOaN5Snb5Tm\n\tBcAAa3bxdTgjGsBRo7wy7UzMQ2apnA7AxFMsYakPlTeOLdH++a5H8AeMrJbsvJxwP7\n\tl0NJ96vXtTGeA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682514791; x=1685106791;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=5a8LR0uxpT9CI908IO5AGVgppN0gjMdZsaYRnh9qcDc=;\n\tb=Hzj3PBJrKbWlLoVY48yAtPyNEDZIaHFnQ55V+iFtVsGkF10sQRdfjbkEZWVJdCkeLo\n\tMqq2aetNs61QeeLBpPHeRaqzHP5BIIrVBQdh0A5ifG6ckIK/EYqX19W1nR1j1f0eParu\n\tEIFA7EW+uAPXSesCCVK9MAaA5+/9sY4JnLIPaFTOuP0q7L0vUOp8V7ZW/SalqnnYPFB3\n\t5yPqHXbQGw5DlKEVR9ZGlOdn6WCQDdKgw4n20G8WObe77kUTJ0TOUAgrmvUbr2NmLG6t\n\tYigilm2ewhcwM+/DfE8HQUl8Qal5yIA2fiVB8qKTlcOeXCP3d7TDx42teAgdopqtAfHS\n\tDRRA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Hzj3PBJr\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682514791; x=1685106791;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=5a8LR0uxpT9CI908IO5AGVgppN0gjMdZsaYRnh9qcDc=;\n\tb=Pt/LNkm1AsqhJRNPfHmH1I1LDcHA/yZFxe+Xbajgvz9TvshofhfH3w34+zK6QA1Flf\n\tpp02h+ouTwuSv+BD3Nt8jTdv8qRPNUJYQb8HwPo4aBfd4n+BWZVd5n1+A51CdsbI4RUG\n\t5uMIyp/h/RWaNT/fGeNlDQbfiHcXCppOQ6JipTF0VkfB03F6uSTuRldpEb6VrYkJpmM0\n\tIVN7Dzo6SlsyrQsgT49OYEcbWv0XwG1pWSUFCF97ImR5QlM39o8aeP2PkrB9PyXyitJB\n\texAP+X3egNyEmIrA+wQbW1SEkgQEKQRZhuDnI/qzXU7gPicll2gsX+Pi61XogKRZhumS\n\tKrBA==", "X-Gm-Message-State": "AAQBX9cmf0AHUZnPsVmapc3K+68t4zxo6mf6wQjvhIHoA29nFtuR/Crl\n\ttAFv7COykAXfurWLlG/Muujwy6B/JbQC6lgZQrAUnA==", "X-Google-Smtp-Source": "AKy350a/OvOwyDnxYbkhSTDSz4tjqbFZP3KekBiHaPr8zYlm+L2eh7S7n69o40gsiYjZd2H2K0twjw==", "X-Received": "by 2002:a5d:55cf:0:b0:2ff:613c:af5d with SMTP id\n\ti15-20020a5d55cf000000b002ff613caf5dmr13801454wrw.36.1682514790841; \n\tWed, 26 Apr 2023 06:13:10 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 26 Apr 2023 14:10:45 +0100", "Message-Id": "<20230426131057.21550-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20230426131057.21550-1-naush@raspberrypi.com>", "References": "<20230426131057.21550-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 01/13] meson: ipa: Add mapping for\n\tpipeline handler to mojom interface file", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Allow an arbitrary mapping between the pipeline handler and IPA mojom\ninterface file in the build system. This removes the 1:1 mapping of\npipeline handler name to mojom filename, and allows more flexibility to\npipeline developers.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n Documentation/guides/ipa.rst | 19 ++++++++--------\n include/libcamera/ipa/meson.build | 36 ++++++++++++++++++++-----------\n 2 files changed, 33 insertions(+), 22 deletions(-)", "diff": "diff --git a/Documentation/guides/ipa.rst b/Documentation/guides/ipa.rst\nindex fc0317451e24..89839408672a 100644\n--- a/Documentation/guides/ipa.rst\n+++ b/Documentation/guides/ipa.rst\n@@ -269,35 +269,36 @@ The following is an example of an event interface definition:\n Compiling the IPA interface\n ---------------------------\n \n-After the IPA interface is defined in include/libcamera/ipa/{pipeline_name}.mojom,\n+After the IPA interface is defined in include/libcamera/ipa/{interface_name}.mojom,\n an entry for it must be added in meson so that it can be compiled. The filename\n-must be added to the ipa_mojom_files object in include/libcamera/ipa/meson.build.\n+must be added to the pipeline_ipa_mojom_mapping object in include/libcamera/ipa/meson.build.\n+This object maps the pipeline handler name with an ipa interface file.\n \n For example, adding the raspberrypi.mojom file to meson:\n \n .. code-block:: none\n \n- ipa_mojom_files = [\n- 'raspberrypi.mojom',\n+ pipeline_ipa_mojom_mapping = [\n+ 'raspberrypi': 'raspberrypi.mojom',\n ]\n \n This will cause the mojo data definition file to be compiled. Specifically, it\n generates five files:\n \n - a header describing the custom data structures, and the complete IPA\n- interface (at {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_interface.h)\n+ interface (at {$build_dir}/include/libcamera/ipa/{interface}_ipa_interface.h)\n \n - a serializer implementing de/serialization for the custom data structures (at\n- {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_serializer.h)\n+ {$build_dir}/include/libcamera/ipa/{interface}_ipa_serializer.h)\n \n - a proxy header describing a specialized IPA proxy (at\n- {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_proxy.h)\n+ {$build_dir}/include/libcamera/ipa/{interface}_ipa_proxy.h)\n \n - a proxy source implementing the IPA proxy (at\n- {$build_dir}/src/libcamera/proxy/{pipeline}_ipa_proxy.cpp)\n+ {$build_dir}/src/libcamera/proxy/{interface}_ipa_proxy.cpp)\n \n - a proxy worker source implementing the other end of the IPA proxy (at\n- {$build_dir}/src/libcamera/proxy/worker/{pipeline}_ipa_proxy_worker.cpp)\n+ {$build_dir}/src/libcamera/proxy/worker/{interface}_ipa_proxy_worker.cpp)\n \n The IPA proxy serves as the layer between the pipeline handler and the IPA, and\n handles threading vs isolation transparently. The pipeline handler and the IPA\ndiff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex 442ca3dd7e1c..67c31cb04ccf 100644\n--- a/include/libcamera/ipa/meson.build\n+++ b/include/libcamera/ipa/meson.build\n@@ -60,13 +60,15 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n './' +'@INPUT@'\n ])\n \n-ipa_mojom_files = [\n- 'ipu3.mojom',\n- 'raspberrypi.mojom',\n- 'rkisp1.mojom',\n- 'vimc.mojom',\n-]\n-\n+# Mapping from pipeline handler name to mojom file\n+pipeline_ipa_mojom_mapping = {\n+ 'ipu3': 'ipu3.mojom',\n+ 'rkisp1': 'rkisp1.mojom',\n+ 'raspberrypi': 'raspberrypi.mojom',\n+ 'vimc': 'vimc.mojom',\n+}\n+\n+ipa_mojom_files = []\n ipa_mojoms = []\n \n #\n@@ -75,14 +77,22 @@ ipa_mojoms = []\n \n # TODO Define per-pipeline ControlInfoMap with yaml?\n \n-foreach file : ipa_mojom_files\n+foreach pipeline, file : pipeline_ipa_mojom_mapping\n+\n name = file.split('.')[0]\n \n- if name not in pipelines\n+ # Ensure we do not build duplicate mojom modules\n+ if (file in ipa_mojom_files)\n+ continue\n+ endif\n+\n+ ipa_mojom_files += file\n+\n+ if pipeline not in pipelines\n continue\n endif\n \n- # {pipeline}.mojom-module\n+ # {interface}.mojom-module\n mojom = custom_target(name + '_mojom_module',\n input : file,\n output : file + '-module',\n@@ -94,7 +104,7 @@ foreach file : ipa_mojom_files\n '--mojoms', '@INPUT@'\n ])\n \n- # {pipeline}_ipa_interface.h\n+ # {interface}_ipa_interface.h\n header = custom_target(name + '_ipa_interface_h',\n input : mojom,\n output : name + '_ipa_interface.h',\n@@ -110,7 +120,7 @@ foreach file : ipa_mojom_files\n './' +'@INPUT@'\n ])\n \n- # {pipeline}_ipa_serializer.h\n+ # {interface}_ipa_serializer.h\n serializer = custom_target(name + '_ipa_serializer_h',\n input : mojom,\n output : name + '_ipa_serializer.h',\n@@ -124,7 +134,7 @@ foreach file : ipa_mojom_files\n './' +'@INPUT@'\n ])\n \n- # {pipeline}_ipa_proxy.h\n+ # {interface}_ipa_proxy.h\n proxy_header = custom_target(name + '_proxy_h',\n input : mojom,\n output : name + '_ipa_proxy.h',\n", "prefixes": [ "libcamera-devel", "01/13" ] }