Show a patch.

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

{
    "id": 9614,
    "url": "https://patchwork.libcamera.org/api/patches/9614/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9614/",
    "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": "<20200915142038.28757-6-paul.elder@ideasonboard.com>",
    "date": "2020-09-15T14:20:20",
    "name": "[libcamera-devel,05/23] meson: ipa, proxy: Generate headers and proxy with mojo",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b3e4ca54b3042f0b2e2909f92ac7a687aa08bbdc",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9614/mbox/",
    "series": [
        {
            "id": 1291,
            "url": "https://patchwork.libcamera.org/api/series/1291/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1291",
            "date": "2020-09-15T14:20:16",
            "name": "IPA isolation implementation",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1291/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9614/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9614/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 5CB08BF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 15 Sep 2020 14:21:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2CA0562E1B;\n\tTue, 15 Sep 2020 16:21:09 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6178E62E17\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Sep 2020 16:21:05 +0200 (CEST)",
            "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 7D912AEA;\n\tTue, 15 Sep 2020 16:21:03 +0200 (CEST)"
        ],
        "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=\"tRobn0uj\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1600179665;\n\tbh=lyec7IuQNDjIoeYJuLdzbvq+kOvt4iSbPVo3OIP9voA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=tRobn0ujZ7BPnUTv9fZUj1TXLd7fTkpwM/+cLI+xGcMDjvJEThVqQdY7SkO8ZfQjx\n\txnHe0Voe0CaDB58UPUVPt/q4rBjvvTLTwa7ifQ4R2vwA23gc0NVbu23ilsGgfH1mQQ\n\tBOm4euWSR2vAr3lcDSthOn7q80v2qcW28+STJW74=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 15 Sep 2020 23:20:20 +0900",
        "Message-Id": "<20200915142038.28757-6-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200915142038.28757-1-paul.elder@ideasonboard.com>",
        "References": "<20200915142038.28757-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 05/23] meson: ipa,\n\tproxy: Generate headers and proxy with mojo",
        "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": "Run mojo from meson to generate the header, serializer, and proxy files\nfor every pipeline's mojom data definition file. So far we only have the\nraspberrypi mojom file.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n\nDictionaries with non-literal keys is apparently a meson 0.53 feature.\n\n include/libcamera/ipa/meson.build      | 87 ++++++++++++++++++++++++++\n src/libcamera/proxy/meson.build        | 21 +++++++\n src/libcamera/proxy/worker/meson.build | 25 +++++++-\n 3 files changed, 131 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex 508c6bd1..f61a5a8f 100644\n--- a/include/libcamera/ipa/meson.build\n+++ b/include/libcamera/ipa/meson.build\n@@ -8,3 +8,90 @@ libcamera_ipa_headers = files([\n \n install_headers(libcamera_ipa_headers,\n                 subdir: join_paths(libcamera_include_dir, 'ipa'))\n+\n+#\n+# Prepare IPA/IPC generation components\n+#\n+\n+ipa_mojom_files = []\n+\n+mojom_generator = find_program('../../../utils/ipc/generate.py')\n+\n+mojom_template = custom_target('mojom_template',\n+                               output : 'dummy',\n+                               command : [mojom_generator, 'precompile'])\n+\n+mojom_parser = find_program('../../../utils/ipc/mojo/public/tools/mojom/mojom_parser.py')\n+\n+# {pipeline}.mojom-module\n+ipa_mojoms = {}\n+\n+foreach file : ipa_mojom_files\n+    name = file.split('.')[0]\n+    mojom = custom_target(file.split('.')[0] + '_mojom_module',\n+                          input : file,\n+                          output : file + '-module',\n+                          command : [mojom_parser,\n+                                     '--output-root', meson.build_root(),\n+                                     '--input-root', meson.source_root(),\n+                                     '--mojoms', '@INPUT@'\n+                          ])\n+    ipa_mojoms += { name: mojom }\n+endforeach\n+\n+#\n+# Generate headers from templates.\n+#\n+\n+# {pipeline}_generated.h\n+# generate {pipeline}_serializer.h\n+# generate ipa_proxy_{pipeline}.h\n+ipa_headers = {}\n+ipa_serializers = {}\n+ipa_proxy_headers = {}\n+\n+foreach name, mojom : ipa_mojoms\n+    header = custom_target(name + '_generated_h',\n+                           input : mojom,\n+                           output : name + '_generated.h',\n+                           depends : mojom_template,\n+                           command : [mojom_generator, 'generate',\n+                                      '-g', 'libcamera',\n+                                      '--bytecode_path', '.',\n+                                      '--libcamera_generate_header',\n+                                      '--libcamera_output_path=@OUTPUT@',\n+                                      './' +'@INPUT@'\n+                           ])\n+\n+    serializer = custom_target(name + '_serializer_h',\n+                               input : mojom,\n+                               output : name + '_serializer.h',\n+                               depends : mojom_template,\n+                               command : [mojom_generator, 'generate',\n+                                          '-g', 'libcamera',\n+                                          '--bytecode_path', '.',\n+                                          '--libcamera_generate_serializer',\n+                                          '--libcamera_output_path=@OUTPUT@',\n+                                          './' +'@INPUT@'\n+                               ])\n+\n+    proxy_header = custom_target(name + '_proxy_h',\n+                                 input : mojom,\n+                                 output : 'ipa_proxy_' + name + '.h',\n+                                 depends : mojom_template,\n+                                 command : [mojom_generator, 'generate',\n+                                            '-g', 'libcamera',\n+                                            '--bytecode_path', '.',\n+                                            '--libcamera_generate_proxy_h',\n+                                            '--libcamera_output_path=@OUTPUT@',\n+                                            './' +'@INPUT@'\n+                                 ])\n+\n+    ipa_headers += { name: header }\n+    ipa_serializers += { name: serializer }\n+    ipa_proxy_headers += { name: proxy_header }\n+endforeach\n+\n+libcamera_internal_headers += ipa_proxy_headers\n+libcamera_internal_headers += ipa_headers\n+libcamera_internal_headers += ipa_serializers\ndiff --git a/src/libcamera/proxy/meson.build b/src/libcamera/proxy/meson.build\nindex bd804750..b0d35646 100644\n--- a/src/libcamera/proxy/meson.build\n+++ b/src/libcamera/proxy/meson.build\n@@ -4,3 +4,24 @@ libcamera_sources += files([\n     'ipa_proxy_linux.cpp',\n     'ipa_proxy_thread.cpp',\n ])\n+\n+# generate ipa_proxy_{pipeline}.cpp\n+ipa_proxy_sources = []\n+\n+foreach name, mojom : ipa_mojoms\n+    ipa_proxy_sources += custom_target(name + '_proxy_cpp',\n+                                       input : mojom,\n+                                       output : 'ipa_proxy_' + name + '.cpp',\n+                                       depends : [mojom_template,\n+                                                  ipa_headers[name],\n+                                                  ipa_serializers[name],\n+                                                  ipa_proxy_headers[name]],\n+                                       command : [mojom_generator, 'generate',\n+                                                  '-g', 'libcamera',\n+                                                  '--bytecode_path', '.',\n+                                                  '--libcamera_generate_proxy_cpp',\n+                                                  '--libcamera_output_path=@OUTPUT@',\n+                                                  './' + '@INPUT@'])\n+endforeach\n+\n+libcamera_sources += ipa_proxy_sources\ndiff --git a/src/libcamera/proxy/worker/meson.build b/src/libcamera/proxy/worker/meson.build\nindex ac0310a7..c35be70c 100644\n--- a/src/libcamera/proxy/worker/meson.build\n+++ b/src/libcamera/proxy/worker/meson.build\n@@ -4,10 +4,31 @@ ipa_proxy_sources = [\n     ['ipa_proxy_linux', 'ipa_proxy_linux_worker.cpp']\n ]\n \n+# generate ipa_proxy_{pipeline}_worker.cpp\n+ipa_proxy_sources = {}\n+\n+foreach name, mojom : ipa_mojoms\n+    worker = custom_target(name + '_proxy_worker',\n+                           input : mojom,\n+                           output : 'ipa_proxy_' + name + '_worker.cpp',\n+                           depends : [mojom_template,\n+                                      ipa_headers[name],\n+                                      ipa_serializers[name],\n+                                      ipa_proxy_headers[name]],\n+                           command : [mojom_generator, 'generate',\n+                                      '-g', 'libcamera',\n+                                      '--bytecode_path', '.',\n+                                      '--libcamera_generate_proxy_worker',\n+                                      '--libcamera_output_path=@OUTPUT@',\n+                                      './' + '@INPUT@'\n+                           ])\n+    ipa_proxy_sources += { 'ipa_proxy_' + name : worker }\n+endforeach\n+\n proxy_install_dir = join_paths(get_option('libexecdir'), 'libcamera')\n \n-foreach t : ipa_proxy_sources\n-    proxy = executable(t[0], t[1],\n+foreach k, t : ipa_proxy_sources\n+    proxy = executable(k, t,\n                        install : true,\n                        install_dir : proxy_install_dir,\n                        dependencies : libcamera_dep)\n",
    "prefixes": [
        "libcamera-devel",
        "05/23"
    ]
}