Show a patch.

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

{
    "id": 19137,
    "url": "https://patchwork.libcamera.org/api/patches/19137/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19137/",
    "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": "<20231013074841.16972-14-naush@raspberrypi.com>",
    "date": "2023-10-13T07:48:34",
    "name": "[libcamera-devel,v2,13/20] build: ipa: Fix bug in building multiple IPA interfaces with the same mojom file",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "3d772969f02bb0e7aefa8f30e543126aaa60d5b4",
    "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/19137/mbox/",
    "series": [
        {
            "id": 4049,
            "url": "https://patchwork.libcamera.org/api/series/4049/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4049",
            "date": "2023-10-13T07:48:21",
            "name": "Raspberry Pi: Preliminary PiSP support",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4049/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19137/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19137/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 28C71C32B6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Oct 2023 07:49:05 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C886C62989;\n\tFri, 13 Oct 2023 09:49:04 +0200 (CEST)",
            "from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7A3926297E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 09:48:56 +0200 (CEST)",
            "by mail-wm1-x32a.google.com with SMTP id\n\t5b1f17b1804b1-40572aeb673so19437145e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 00:48:56 -0700 (PDT)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tm16-20020a7bca50000000b003fee6e170f9sm1791890wml.45.2023.10.13.00.48.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Oct 2023 00:48:55 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1697183344;\n\tbh=M7cvfczoL4R5A+xDn9pwR2p2QJHc8GIJiZGE4EeFT/I=;\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=C7L8NIOShC7K0hhiZ3MB3j+5mvpsX+aeGVNZmk6AIOUG/vmWhkTCos/O2qwV/zefm\n\tHy4mLYwnOX2s3WW5nYhHv4fKDvEzruChdICOGw8c2z5WkT5RALfOud+5xG40B8w2PX\n\tFKXbbiTQ53avOwvXz6MONDDnQBP2C9eaogsuvnQC6roPmMoQ/X5hXQktOdya2v4pYW\n\tRO3AB3jCYdPC4BBSomXhpBsS1DrahW4zUiHQ7w80r7PHHyeoO1r5pnoSmbuTGPTP3q\n\t7qP+TgLQLm2SiUDtIjpr+KcBUQFm9Z0BxPHBts1UGbNIu4u1zJHvQWqNAsl+WXAR1D\n\tByt8t53sAWDQw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1697183336; x=1697788136;\n\tdarn=lists.libcamera.org; \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=D4exOpCTPvbDuxJSbapt0qMAr2YwjKudXo3nibFYFyU=;\n\tb=mIdvPe+T5DZxyhHgTRHYTg6r84EszWZ1zFVjZPIZ40nC0MGcoYZLPxIrptLQFTsWW2\n\ts8fSQU8ccRw67pqlVCwpiqKMwJoV+eEVzZXEqmK4GFIW+c1hNzbGj/Y4/BPoZvVCY1T5\n\tteEa2lkRIYswvM1jHTUVafUGbS638rxPazcD6tdxFMrsZVuumcpifAoKYZyeROLxi+V2\n\tE8EO7bwOmN2EL/wSUWWg69OMqmd0cCAGTqcEpjqiE6WGYawlJv9/BduZX17RnPln50TZ\n\tvjMkdcKuk2QOj8vccGQLJd/BPh/cX6F3Zg83CihL2NzFoot4RL4QsV5IMrVA7DiU1juy\n\tXKbA=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"mIdvPe+T\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1697183336; x=1697788136;\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=D4exOpCTPvbDuxJSbapt0qMAr2YwjKudXo3nibFYFyU=;\n\tb=ZVGN029XeM8U1pIhe9TO+377qqtana8pp53PFTkQOpGbZCAMtnW1Vm46Ks85Zjgq3T\n\tdoBekFXBgNg9QlHKoLWWd0b5woTX0rlgSBbMVEnw+fQSZE1u0HJtWYCCswDsVDUoYWEt\n\tPNu2u8pk8zHCvvitY29DTnYQA2heky0JshP/ZnQy42UX0a4gy55kbI350Fc+g9y+CGCC\n\tjj8Hc+5EO3klzF3TNmKcRm+ZgSmuUjDG+nLWZXERjne1wEeqUW+sEaJ+wcMWp+IHM6oY\n\tMKPuzYxqTT6Y8zz70z/KP8PE025j10o8dyKtkPWS+Ug5EDHIID1+S5bRvC4bQxppbxrX\n\tiaiA==",
        "X-Gm-Message-State": "AOJu0Yz5sX40FFK6ClxDv7iWNB+9OcOvHSDt4gxTq1GLhW1gLMKVoxP0\n\tFqIJvAt8QO2DAfeuLep4f5dOzWdojo4xvHLWI4jy3g==",
        "X-Google-Smtp-Source": "AGHT+IH6zsrEcNFZTxNFOChmQ9s/KKMyLFCkbqY/0l8CUQBkrVGr8avfgOkkwqKR5Qp4ZZfq6oluvQ==",
        "X-Received": "by 2002:a05:600c:2197:b0:406:5227:86f0 with SMTP id\n\te23-20020a05600c219700b00406522786f0mr21550523wme.5.1697183335808; \n\tFri, 13 Oct 2023 00:48:55 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 13 Oct 2023 08:48:34 +0100",
        "Message-Id": "<20231013074841.16972-14-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231013074841.16972-1-naush@raspberrypi.com>",
        "References": "<20231013074841.16972-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 13/20] build: ipa: Fix bug in building\n\tmultiple IPA interfaces with the same mojom 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": "In the existing meson scripts, an IPA mojom interface file may not be\nbuilt if:\n\n- There are duplicate entries for the mojom file shared by different\n  pipeline handlers in pipeline_ipa_mojom_mapping, and\n- The IPA is not listed first in pipeline_ipa_mojom_mapping, and\n- The first listed IPA for the given mojom file is not selected in the\n  build.\n\nFix this by using a separate list of already built mojom files\n(mojoms_built) instead of overloading use of the existing\nipa_mojom_files list.  Now, ipa_mojom_files gets filled in outside of\nthe IPA list enumeration loop, this also guarantees the IPA\ndocumentation gets built even if the pipeline is not selected.\n\nFixes: 312e9910ba2e (\"meson: ipa: Add mapping for pipeline handler to mojom interface file\")\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/ipa/meson.build | 19 ++++++++++++-------\n 1 file changed, 12 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex e72803b4e243..f3b4881c9c91 100644\n--- a/include/libcamera/ipa/meson.build\n+++ b/include/libcamera/ipa/meson.build\n@@ -68,29 +68,28 @@ pipeline_ipa_mojom_mapping = {\n     'vimc': 'vimc.mojom',\n }\n \n-ipa_mojom_files = []\n-ipa_mojoms = []\n-\n #\n # Generate headers from templates.\n #\n \n # TODO Define per-pipeline ControlInfoMap with yaml?\n \n+ipa_mojoms = []\n+mojoms_built = []\n foreach pipeline, file : pipeline_ipa_mojom_mapping\n     name = file.split('.')[0]\n \n-    # Ensure we do not build duplicate mojom modules\n-    if file in ipa_mojom_files\n+    # Avoid building duplicate mojom interfaces with the same interface file\n+    if name in mojoms_built\n         continue\n     endif\n \n-    ipa_mojom_files += file\n-\n     if pipeline not in pipelines\n         continue\n     endif\n \n+    mojoms_built += name\n+\n     # {interface}.mojom-module\n     mojom = custom_target(name + '_mojom_module',\n                           input : file,\n@@ -155,6 +154,12 @@ foreach pipeline, file : pipeline_ipa_mojom_mapping\n     libcamera_generated_ipa_headers += [header, serializer, proxy_header]\n endforeach\n \n+ipa_mojom_files = []\n+foreach pipeline, file : pipeline_ipa_mojom_mapping\n+    if file not in ipa_mojom_files\n+        ipa_mojom_files += file\n+    endif\n+endforeach\n ipa_mojom_files = files(ipa_mojom_files)\n \n # Pass this to the documentation generator in src/libcamera/ipa\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "13/20"
    ]
}