Show a patch.

GET /api/patches/10578/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 10578,
    "url": "https://patchwork.libcamera.org/api/patches/10578/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10578/",
    "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": "<20201205103106.242080-16-paul.elder@ideasonboard.com>",
    "date": "2020-12-05T10:30:58",
    "name": "[libcamera-devel,v5,15/23] ipa: Add core.mojom",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "71bbbb1e9b5e3e1a99224e192e9c9b6a57996fc7",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/users/17/?format=api",
        "username": "epaul",
        "first_name": "Paul",
        "last_name": "Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/10578/mbox/",
    "series": [
        {
            "id": 1506,
            "url": "https://patchwork.libcamera.org/api/series/1506/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1506",
            "date": "2020-12-05T10:30:43",
            "name": "IPA isolation implementation",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/1506/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10578/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10578/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 1F3FFBDB20\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  5 Dec 2020 10:31:53 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E0624635F7;\n\tSat,  5 Dec 2020 11:31:52 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3BA33635F0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  5 Dec 2020 11:31:51 +0100 (CET)",
            "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E002E2A4;\n\tSat,  5 Dec 2020 11:31:49 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"PCN/H+M5\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1607164311;\n\tbh=Fm4HJRsgUgglTjCk0tlLbatRl2NUctPVXAw+w0687E4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=PCN/H+M53Xd/Fo5RMyEjMToIobW22o2mwkgpkxTkkuL7H64jkES3uNUIRcItEgB+r\n\tak/2Uc2yhDidwSKNGPYIPpV/1U5I4+t1vBtnaniw7493rST5QV6juqm2Ptweml4VBs\n\td/TiEHACZqimNpFX1u8/1B9TnWWCYYI1YjafCXZA=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  5 Dec 2020 19:30:58 +0900",
        "Message-Id": "<20201205103106.242080-16-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201205103106.242080-1-paul.elder@ideasonboard.com>",
        "References": "<20201205103106.242080-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v5 15/23] ipa: Add core.mojom",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a base mojom file to contain empty mojom definitions of libcamera\nobjects, as well as documentation for the IPA interfaces that need to be\ndefined in the mojom files.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nChanges in v5:\n- add todo for defining some libcamera ipa structs in mojom\n- remove ipa_mojom_core from dependencies of everything in the generator\n  stage\n- add documentation for the base IPA functions (init, stop, start)\n\nChanges in v4:\n- move docs to IPA guide\n\nChanges in v3:\n- add doc that structs need to be defined\n- add doc to recommend namespacing\n- change indentation\n- add requirement that base controls *must* be defined in\n  libcamera::{pipeline_name}::Controls\n\nNew in v2\n---\n include/libcamera/ipa/core.mojom       | 48 ++++++++++++++++++++++++++\n include/libcamera/ipa/meson.build      | 14 +++++++-\n src/libcamera/proxy/meson.build        |  4 +--\n src/libcamera/proxy/worker/meson.build |  4 +--\n 4 files changed, 65 insertions(+), 5 deletions(-)\n create mode 100644 include/libcamera/ipa/core.mojom",
    "diff": "diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\nnew file mode 100644\nindex 00000000..95d12b63\n--- /dev/null\n+++ b/include/libcamera/ipa/core.mojom\n@@ -0,0 +1,48 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+\n+/*\n+ * Any libcamera objects that are used by any interfaces that aren't defined\n+ * in mojom must be declared here, and a (de)serializer be implemented as a\n+ * template specialization of IPADataSerializer. In addition, the corresponding\n+ * header file (or forward-declarations) must be included in {pipeline_name}.h.\n+ *\n+ * For libcamera types, the [hasFd] attribute is needed to notify the compiler\n+ * that the struct embeds a FileDescriptor.\n+ */\n+struct CameraSensorInfo {};\n+struct ControlInfoMap {};\n+struct ControlList {};\n+struct FileDescriptor {};\n+\n+/* \\todo Define these structures fully in mojom. */\n+[hasFd] struct IPABuffer {};\n+struct IPASettings {};\n+struct IPAStream {};\n+\n+/**\n+ * \\fn init()\n+ * \\brief Initialise the IPAInterface\n+ * \\param[in] settings The IPA initialization settings\n+ *\n+ * This function initializes the IPA interface. It shall be called before any\n+ * other function of the IPAInterface. The \\a settings carry initialization\n+ * parameters that are valid for the whole life time of the IPA interface.\n+ */\n+\n+/**\n+ * \\fn start()\n+ * \\brief Start the IPA\n+ *\n+ * This method informs the IPA module that the camera is about to be started.\n+ * The IPA module shall prepare any resources it needs to operate.\n+ *\n+ * \\return 0 on success or a negative error code otherwise\n+ */\n+\n+/**\n+ * \\fn stop()\n+ * \\brief Stop the IPA\n+ *\n+ * This method informs the IPA module that the camera is stopped. The IPA module\n+ * shall release resources prepared in start().\n+ */\ndiff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex d7a2b6b2..087f5bbd 100644\n--- a/include/libcamera/ipa/meson.build\n+++ b/include/libcamera/ipa/meson.build\n@@ -13,6 +13,17 @@ install_headers(libcamera_ipa_headers,\n # Prepare IPA/IPC generation components\n #\n \n+core_mojom_file = 'core.mojom'\n+ipa_mojom_core = custom_target(core_mojom_file.split('.')[0] + '_mojom_module',\n+                               input : core_mojom_file,\n+                               output : core_mojom_file + '-module',\n+                               command : [\n+                                   mojom_parser,\n+                                   '--output-root', meson.build_root(),\n+                                   '--input-root', meson.source_root(),\n+                                   '--mojoms', '@INPUT@'\n+                               ])\n+\n ipa_mojom_files = []\n \n ipa_mojoms = []\n@@ -30,6 +41,7 @@ foreach file : ipa_mojom_files\n     mojom = custom_target(file.split('.')[0] + '_mojom_module',\n                           input : file,\n                           output : file + '-module',\n+                          depends : ipa_mojom_core,\n                           command : [\n                               mojom_parser,\n                               '--output-root', meson.build_root(),\n@@ -68,7 +80,7 @@ foreach file : ipa_mojom_files\n     # ipa_proxy_{pipeline}.h\n     proxy_header = custom_target(name + '_proxy_h',\n                                  input : mojom,\n-                                 output : 'ipa_proxy_' + name + '.h',\n+                                 output : name + '_ipa_proxy.h',\n                                  depends : mojom_templates,\n                                  command : [\n                                      mojom_generator, 'generate',\ndiff --git a/src/libcamera/proxy/meson.build b/src/libcamera/proxy/meson.build\nindex 5965589f..a3f6b223 100644\n--- a/src/libcamera/proxy/meson.build\n+++ b/src/libcamera/proxy/meson.build\n@@ -4,8 +4,8 @@\n foreach mojom : ipa_mojoms\n     proxy = custom_target(mojom['name'] + '_proxy_cpp',\n                           input : mojom['mojom'],\n-                          output : 'ipa_proxy_' + mojom['name'] + '.cpp',\n-                          depends : [mojom_templates],\n+                          output : mojom['name'] + '_ipa_proxy.cpp',\n+                          depends : mojom_templates,\n                           command : [\n                               mojom_generator, 'generate',\n                               '-g', 'libcamera',\ndiff --git a/src/libcamera/proxy/worker/meson.build b/src/libcamera/proxy/worker/meson.build\nindex f3129b76..cc55078f 100644\n--- a/src/libcamera/proxy/worker/meson.build\n+++ b/src/libcamera/proxy/worker/meson.build\n@@ -6,8 +6,8 @@ proxy_install_dir = join_paths(get_option('libexecdir'), 'libcamera')\n foreach mojom : ipa_mojoms\n     worker = custom_target(mojom['name'] + '_proxy_worker',\n                            input : mojom['mojom'],\n-                           output : 'ipa_proxy_' + mojom['name'] + '_worker.cpp',\n-                           depends : [mojom_templates],\n+                           output : mojom['name'] + '_ipa_proxy_worker.cpp',\n+                           depends : mojom_templates,\n                            command : [\n                                mojom_generator, 'generate',\n                                '-g', 'libcamera',\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "15/23"
    ]
}