Show a patch.

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

{
    "id": 23214,
    "url": "https://patchwork.libcamera.org/api/patches/23214/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23214/",
    "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": "<20250422215920.4297-2-bryan.odonoghue@linaro.org>",
    "date": "2025-04-22T21:58:54",
    "name": "[01/27] libcamera: MappedFrameBuffer: Add tracking of mmap file descriptors to MappedFrameBuffer",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": false,
    "hash": "83a02a52d0511bf114e9cc5185dfe4a180b29a64",
    "submitter": {
        "id": 175,
        "url": "https://patchwork.libcamera.org/api/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23214/mbox/",
    "series": [
        {
            "id": 5142,
            "url": "https://patchwork.libcamera.org/api/series/5142/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5142",
            "date": "2025-04-22T21:58:53",
            "name": "RFC: Add in a eGL based GPUISP in libcamera",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5142/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23214/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23214/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 1D2B4C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 21:59:29 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CD0A868AD0;\n\tTue, 22 Apr 2025 23:59:26 +0200 (CEST)",
            "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4CEF3617E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 23:59:24 +0200 (CEST)",
            "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-43ed8d32a95so49910485e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 14:59:24 -0700 (PDT)",
            "from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-44092d2eccesm2726615e9.20.2025.04.22.14.59.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Apr 2025 14:59:23 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Sx8+ob8N\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1745359164; x=1745963964;\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=O/XNpCvNvuFewDwxBLgujn8Rp4YOl/7WSgH2ZliwlXs=;\n\tb=Sx8+ob8NQgRClu5pLeJom2KzwKkMMcCz5k++jeaY5EomBDmE30PST3nMNZ1+pdixU9\n\tvnbDe83KE0fh5dCw7yMqkYaN2HoVuAkrvH8Rv78hdM1iwgIhm2UlxU2yrJ5u3OUvQl8K\n\tgQ9FlamD662PY/F6TxYwv8Q27mCf9yWxhWKPm9JDrhp6naIhadqBwcKKjo3vewEOKYQC\n\tRPwUSvj6HnxUlXPtSohfZf7lY40bLjoqg0Kcsx4DOGYeAPys8yM0HskXeIy6FixZl2RJ\n\trc7QV6wqodYRlbzNs+ibVp5+JZ+a8caR8RgVTOEubHXjJrC38xyTx8OQKiZ1fBbmLEfa\n\tsoTw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1745359164; x=1745963964;\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=O/XNpCvNvuFewDwxBLgujn8Rp4YOl/7WSgH2ZliwlXs=;\n\tb=Su9uxptAhVaOoZ2dbGU1By5I+ygZzO4+dKHP7NbKrWSRRjPpc1YSMpize6RZiiht5x\n\tIwX3aK4J7+qmm1K7i/Qn4j7mvvw073IBaBiQ3B38U7WVBUQRfEZbNHp0zRnWEI8csQJU\n\ti1e05Wun8gADEiaPHR5VeEh+ZR76YwczyrhisvryKq2qYzJB36r81RTawnDuCI+diC4S\n\tXFbfpmm22t9hURJhtZEOc64EUJKI2BJ1ciMg573VxQReQvwn/fVX1SpLozr+hUZeoByC\n\t1r+hCPqEY6p420a9TcJa+Sx9kq6sVDqaJ+GT0ZPm8kC2R0Y89E0qoMRcHK3zdzATGQgm\n\tQcEA==",
        "X-Gm-Message-State": "AOJu0Ywn6UzYNpaUy9l9ZzCta2UjrxFv6HiYvqxIjXOOMpBa53VyIqym\n\tGVHlCMNAqm4KOA4JbxymyhKx4LSbTeCXNABN6ma7UgJOp31o9kiMiJ/KNtyy66u9wGOH80Zwe+L\n\tBu8Q=",
        "X-Gm-Gg": "ASbGncuTlGT+t0/isf//jcs4iE6gSrW3SxPWRaQb3mBJQu0hFp3bgn9sCGAkK49CZOK\n\tbc5HgmPuhEdKxln7zBwdMEFEJmpSbBoEXual7qKNCzHgy2Y4/f4XllpKVm4zUA6oRQOlI7tP8zi\n\tLPp7FwXlRIx5eL1n1THSXdr6n7iod8Cz/itg9px7vDlswMqTxJ2BVeZ8m174mj0dYfPrk9fPAZT\n\tBZjEBoTTiwAgXLw993BVWBLR2K20TFAxRMh4krK0HbuztzGQ5bQY1aZF+cdNloB+p8fc/w6E46t\n\t3TEaxbIecS/fY0/DCwhONXgOFUD5FCRthgqpBBg/Rs556U+pkHNkCcYfWH0T27P12AEtRSV9tDJ\n\tHpMcOO3PgigvBU5TGCRk2",
        "X-Google-Smtp-Source": "AGHT+IFpsn55n5+XS9RfN/BqshkJPEi0St5FZzLqzC+GWhguxB4E8cy+924yWUP9RXCbc5v+2F/s6g==",
        "X-Received": "by 2002:a05:600c:3b0d:b0:43d:7413:cb3e with SMTP id\n\t5b1f17b1804b1-4406ab7f548mr133478695e9.1.1745359163662; \n\tTue, 22 Apr 2025 14:59:23 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie",
        "Subject": "[PATCH 01/27] libcamera: MappedFrameBuffer: Add tracking of mmap\n\tfile descriptors to MappedFrameBuffer",
        "Date": "Tue, 22 Apr 2025 22:58:54 +0100",
        "Message-ID": "<20250422215920.4297-2-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250422215920.4297-1-bryan.odonoghue@linaro.org>",
        "References": "<20250422215920.4297-1-bryan.odonoghue@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "In order to import via eglCreateImageKHR via an file descriptor we need to\nhave access to the file descriptor associated with the plane.\n\nExtend MappedFrameBuffer to track the file descriptor giving an accessor\nmethod in-line with the existing planes_ accessor.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/mapped_framebuffer.h | 2 ++\n src/libcamera/mapped_framebuffer.cpp            | 1 +\n 2 files changed, 3 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h\nindex 6aaabf50..cb81243e 100644\n--- a/include/libcamera/internal/mapped_framebuffer.h\n+++ b/include/libcamera/internal/mapped_framebuffer.h\n@@ -31,6 +31,7 @@ public:\n \tbool isValid() const { return error_ == 0; }\n \tint error() const { return error_; }\n \tconst std::vector<Plane> &planes() const { return planes_; }\n+\tconst std::vector<int> &fds() const { return fds_; }\n \n protected:\n \tMappedBuffer();\n@@ -38,6 +39,7 @@ protected:\n \tint error_;\n \tstd::vector<Plane> planes_;\n \tstd::vector<Plane> maps_;\n+\tstd::vector<int> fds_;\n \n private:\n \tLIBCAMERA_DISABLE_COPY(MappedBuffer)\ndiff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp\nindex f54bbf21..82ab132c 100644\n--- a/src/libcamera/mapped_framebuffer.cpp\n+++ b/src/libcamera/mapped_framebuffer.cpp\n@@ -237,6 +237,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)\n \t\t}\n \n \t\tplanes_.emplace_back(info.address + plane.offset, plane.length);\n+\t\tfds_.emplace_back(fd);\n \t}\n }\n \n",
    "prefixes": [
        "01/27"
    ]
}