Show a patch.

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

{
    "id": 18574,
    "url": "https://patchwork.libcamera.org/api/patches/18574/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18574/",
    "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": "<20230428131215.16070-1-naush@raspberrypi.com>",
    "date": "2023-04-28T13:12:15",
    "name": "[libcamera-devel] DNI: Allow nested IPA builds",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4540a63bf080aae317979df3147132a77bd92b61",
    "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/18574/mbox/",
    "series": [
        {
            "id": 3854,
            "url": "https://patchwork.libcamera.org/api/series/3854/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3854",
            "date": "2023-04-28T13:12:15",
            "name": "[libcamera-devel] DNI: Allow nested IPA builds",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3854/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18574/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18574/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 F0A36C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Apr 2023 13:12:24 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1B715627DF;\n\tFri, 28 Apr 2023 15:12:24 +0200 (CEST)",
            "from mail-wm1-x332.google.com (mail-wm1-x332.google.com\n\t[IPv6:2a00:1450:4864:20::332])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E418A627D3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Apr 2023 15:12:22 +0200 (CEST)",
            "by mail-wm1-x332.google.com with SMTP id\n\t5b1f17b1804b1-3f315712406so60611545e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Apr 2023 06:12:22 -0700 (PDT)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ty4-20020adffa44000000b002f013fb708fsm21411463wrr.4.2023.04.28.06.12.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 28 Apr 2023 06:12:21 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682687544;\n\tbh=oS3rT18oaIed89ep3j+qHKgGq8VZsSepf2WT4kHTPWs=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=Aovp9aCVce+t/3F6eioYcCL9p1LS+p2EW3JRx9rKfhovluNPQ/yuD7Ax/EFxNNoiv\n\tW5KMsmhc+6Fqb5qlESNfzdF6riBGbcqY9Vq7DbFdH67VClPuUMJyEpLvvsWdcP8LXN\n\tOMuHPtJy+gXiDMquDHaYNmvYttnzKQj/mlMMvVsDcp5yJetOACDoK8DrqGfiww4puN\n\t7/Po4nB2XK3aPQ2gx5d51rlF2oUJRRMyMmhm8NRnd4pAvpZDzrST8+P9mmN1GGqoUp\n\tyK7/XJKaz0nVDZ+aGzxR/h3oFKAPITN7wrDnCP/GoQu1UnmtKJ5EZuMk/wdMCe0xhE\n\tIoic6wVBvQ8BQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682687542; x=1685279542;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=h1lFjPbiMqJTKRECSgMj+LS5hRQddX/zGUH2+BdDIbg=;\n\tb=IlcH4q7s3tCq6Jt0Spu+8B7DnbeGJ6pAzKDABfuo8lj1d4hl5J+Ez9sxZppfmx1NGK\n\tDhmHh3ZDQUQjQVMUTZgEXh/jQH5yqyskKVj0xMeUvdqdgylvGu2NNX55YzQlZarUelDO\n\t93SoL/pjni6PArG8mTe/w+xJYmsoyfAqKN22JsMyMSreDFn0zy1GEWbdyHuX6eN1EYUR\n\t8/+x4SuO/DDzauvfbDe/n3Q9R4Zk+/JB7cwsohg3I8EsbKGOgyozxahAQHcCs4v+EPW1\n\tsPZVXOUaHPpoCsstPt7bUm82p20b/u5EVayy+hE/74vj512mJbCCSNpHWC78lR+Cb8qz\n\tuT6Q=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"IlcH4q7s\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682687542; x=1685279542;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=h1lFjPbiMqJTKRECSgMj+LS5hRQddX/zGUH2+BdDIbg=;\n\tb=FzNdfg3YljEvC0xGTbZ56qQ7fnVjSBJhKkpnVVo4kumxdeWa5FAFRO1FmBTZpQT0uq\n\tFbMVeZUeIQSZOvPFbYZ9zqL0sFgvtwFrCDb9sxffpG/pX6r64zDNxLe1z3ZsEy+MMmBi\n\tcssvFgRJ+xvXdfTXoQmR5tMd94kjPmi6uYMw1fBOkX6r0JtzfUC7x/po3xT2LgktwuH6\n\tBX0imsDemznvOeHC4IzpPDbt91ZTTXvpKNNgsURHH//L5Iq6cgRp1zEqkd7+uFQUauSy\n\tGpaQ5INHewRiIwBRkbyzOzQU6nVE7tJZdlhFwqnZla2mrSa8xWPv1uf5CAyi9jE99exX\n\tqGDw==",
        "X-Gm-Message-State": "AC+VfDwhOWMg6zLzBncL/6BpQ4iTwQZzGTlw6z2AcaS9sXcdfDsVx2yv\n\t4R6WzOKX/0XTd1nZeGi7w2vMQufPT44DLuCmXdPMaw==",
        "X-Google-Smtp-Source": "ACHHUZ6etNcjlM4K6x16WTIrZeWtHEO2JgBcO2o+fOBylOVRod/MIuBTGQLDzR6RfOgq6Le67gxV6w==",
        "X-Received": "by 2002:adf:f012:0:b0:2fa:2f1e:c1a8 with SMTP id\n\tj18-20020adff012000000b002fa2f1ec1a8mr7513337wro.3.1682687542123; \n\tFri, 28 Apr 2023 06:12:22 -0700 (PDT)",
        "To": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Date": "Fri, 28 Apr 2023 14:12:15 +0100",
        "Message-Id": "<20230428131215.16070-1-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] DNI: Allow nested IPA builds",
        "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": "ONLY FOR TESTING!\n---\n\nHi Laurent,\n\nHere is an attempt at allowing the IPAs to be built within nested directories.\nIt seems to do the trick, but you might be better suited to do something cleaner\nif desired.\n\nRegards,\nNaush\n\n src/ipa/ipu3/meson.build   |  2 ++\n src/ipa/meson.build        | 33 +++++++++++++++++++--------------\n src/ipa/rkisp1/meson.build |  2 ++\n src/ipa/rpi/meson.build    | 14 ++++++++++++++\n 4 files changed, 37 insertions(+), 14 deletions(-)\n create mode 100644 src/ipa/rpi/meson.build",
    "diff": "diff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build\nindex 658e7c9bc366..66c398432d43 100644\n--- a/src/ipa/ipu3/meson.build\n+++ b/src/ipa/ipu3/meson.build\n@@ -29,3 +29,5 @@ if ipa_sign_module\n                   install : false,\n                   build_by_default : true)\n endif\n+\n+ipa_names += ipa_name\ndiff --git a/src/ipa/meson.build b/src/ipa/meson.build\nindex 0c622c38a4a0..ca7fc90e21e0 100644\n--- a/src/ipa/meson.build\n+++ b/src/ipa/meson.build\n@@ -36,34 +36,39 @@ if get_option('test') and 'vimc' not in ipa_modules\n endif\n \n enabled_ipa_modules = []\n-\n-# If the Raspberry Pi VC4 IPA is enabled, ensure we include the cam_helper,\n-# common and controller subdirectories in the build.\n-#\n-# This is done here and not within rpi/vc4/meson.build as meson does not\n-# allow the subdir command to traverse up the directory tree.\n-if pipelines.contains('rpi/vc4')\n-    subdir('rpi/cam_helper')\n-    subdir('rpi/common')\n-    subdir('rpi/controller')\n-endif\n+enabled_ipa_names = []\n+ipa_names = []\n \n # The ipa-sign-install.sh script which uses the ipa_names variable will itself\n # prepend MESON_INSTALL_DESTDIR_PREFIX to each ipa module name, therefore we\n # must not include the prefix string here.\n+\n+subdirs = []\n foreach pipeline : pipelines\n     if ipa_modules.contains(pipeline)\n-        subdir(pipeline)\n-        ipa_names += ipa_install_dir / ipa_name + '.so'\n         enabled_ipa_modules += pipeline\n+\n+        # Allow multi-level directory structuring for the IPAs if needed.\n+        # An example would be the Raspberry Pi IPA (rpi).\n+        pipeline = pipeline.split('/')[0]\n+        if pipeline in subdirs\n+            continue\n+        endif\n+\n+        subdir(pipeline)\n+        subdirs += [pipeline]\n     endif\n endforeach\n \n+foreach ipa_name : ipa_names\n+    enabled_ipa_names += ipa_install_dir / ipa_name + '.so'\n+endforeach\n+\n if ipa_sign_module\n     # Regenerate the signatures for all IPA modules. We can't simply install the\n     # .sign files, as meson strips the DT_RPATH and DT_RUNPATH from binaries at\n     # install time, which invalidates the signatures.\n     meson.add_install_script('ipa-sign-install.sh',\n                              ipa_priv_key.full_path(),\n-                             ipa_names)\n+                             enabled_ipa_names)\n endif\ndiff --git a/src/ipa/rkisp1/meson.build b/src/ipa/rkisp1/meson.build\nindex ccb84b27525b..e813da53ae9b 100644\n--- a/src/ipa/rkisp1/meson.build\n+++ b/src/ipa/rkisp1/meson.build\n@@ -29,3 +29,5 @@ if ipa_sign_module\n                   install : false,\n                   build_by_default : true)\n endif\n+\n+ipa_names += ipa_name\ndiff --git a/src/ipa/rpi/meson.build b/src/ipa/rpi/meson.build\nnew file mode 100644\nindex 000000000000..4811c76f3f9e\n--- /dev/null\n+++ b/src/ipa/rpi/meson.build\n@@ -0,0 +1,14 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+subdir('cam_helper')\n+subdir('common')\n+subdir('controller')\n+\n+foreach pipeline : pipelines\n+    pipeline = pipeline.split('/')\n+    if pipeline.length() < 2 or pipeline[0] != 'rpi'\n+        continue\n+    endif\n+\n+    subdir(pipeline[1])\n+endforeach\n",
    "prefixes": [
        "libcamera-devel"
    ]
}