Show a patch.

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

{
    "id": 23513,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23513/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23513/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20250611013245.133785-8-bryan.odonoghue@linaro.org>",
    "date": "2025-06-11T01:32:17",
    "name": "[07/35] libcamera: MappedFrameBuffer: Add MappedFrameBuffer::getPlaneFD()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "31488279b6b4ba0feee8f564cc4f4ae1b7de2e9c",
    "submitter": {
        "id": 175,
        "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23513/mbox/",
    "series": [
        {
            "id": 5212,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5212/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5212",
            "date": "2025-06-11T01:32:10",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5212/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23513/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23513/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 B430DC3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 11 Jun 2025 01:33:24 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 436F268DCE;\n\tWed, 11 Jun 2025 03:33:24 +0200 (CEST)",
            "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7319D68DC7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 11 Jun 2025 03:33:22 +0200 (CEST)",
            "by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-43edecbfb94so73698915e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Jun 2025 18:33:22 -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-4532514138asm5680625e9.3.2025.06.10.18.33.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 10 Jun 2025 18:33:21 -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=\"YDi4+18p\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1749605602; x=1750210402;\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=6KiB9ywII9IRXnqC57gNGQqpupTJTpps3EfWunIFuPk=;\n\tb=YDi4+18phhX9mkXb/aXPo0QBS4lVbYp2kdf1eM3OzQjBa0+JO86EO9Xl/whRHRSchq\n\t19qI/qyIJhHm1AaQ5QLoyJTyHgnW1s7bAAQafog8EtLGCjAkbXCbTi8hVvZvwuruMhgs\n\tq71GQhRn4TcgI7GQ4aVkdo4k+deK1v/CCeSZB+ChfPOzdBtdvp3S29bDERQvZaxPYrz6\n\tf/F1L0O5hw3AvCZoL9hweszH6qpdMdgLkwc9C90N6nphhO52eX4UqcGpaYFSDfWvPuW7\n\ttKaYGJTnVer9r79SSCVKhKBzViHOKJwgx6gkTt2NCQj5B7JG/pihE/+5gTTKXhfVsWEx\n\tnXZA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1749605602; x=1750210402;\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=6KiB9ywII9IRXnqC57gNGQqpupTJTpps3EfWunIFuPk=;\n\tb=dpMECGqpQoGvoryZnIabsBL5u3niiQsXo0Q3WTZMIKLkfJiTxsqA7BPdFbokmRmE3y\n\t9+kCpsYBsDP3yn2SBvC3kShBWqy7gKjrI2/zt9QPhOMbN8KesSURYEYi0nofwe9+oXNg\n\tzV0C/DV+3FSujH/Ee+Q768XDtFEpmsNkQZat2lyxYVUj1ft74+8PqFvWWI+5u7FKXh3l\n\tzlKDEU4nYnR+kot2gX8SeanWWZWbLVQzqPaCM5e4DkMZxTvJHf80w2PrAljp689GQYSI\n\tZwN5pW8EEEP2kSM3nIyAffqhWYsoADfGGhNuxhPnFUPnEgyPTu9w/rOJQ0j3bhmkdx1q\n\tJC4Q==",
        "X-Gm-Message-State": "AOJu0YzeNWMAIrkNtK4vUpkPIc6WOZagAJjGgtk4DwKm1qKL4dtWyfl0\n\tTCLkfMkMVCI0HnkPpz2WmqeRL/ctPhkBoAoCa6l09GtTOfXBRFAac8+ijdeFAMHW8j+m6njAr+h\n\tkiNHApyE=",
        "X-Gm-Gg": "ASbGnctbw8aR/IY2bYTJasr/TpaZed9V7EkKCdlKMShXna1qqapsVAftx7MdprizruI\n\t/LA1tq3jzfg48HN68BQMCmfGsM28DVawkFRCOTkY8QW0Y6V+Mr9hMPkm613SwcM0VlAjq5rrU05\n\t+JHz8gN6w1rFEyXir68hMD8KIh7/v/j8644Xm53Whth96+3BsHrDXDrXiCG9TfWEA78mSFSiRl4\n\th7/mrXAycOoLxcBvdENGboHf6qYX/py/fB6S4YoucqNbHnoqDCI5x3QY3FPfRUTQrWqX85gSdfW\n\tnUfVFaVSQ95pROIQ0ag3gYpjK+et30rV3oTm63dTk46chQP4L1gXjAt/JfvTteLuMtmDEusj/Fq\n\tYAj6B2rYMVy5J6SPFTxT8kYjGpqAH7FWxy6n0RetF2l9JDKkbct5K",
        "X-Google-Smtp-Source": "AGHT+IHG6o1lWgKjFkO65nblYC4PBeJ+oTxVgOtKzceZofNTsuR8EJP7WC81gyuvynQ6g/3WQUu3dg==",
        "X-Received": "by 2002:a05:600c:1986:b0:43c:fda5:41e9 with SMTP id\n\t5b1f17b1804b1-453248f424amr9771575e9.31.1749605601733; \n\tTue, 10 Jun 2025 18:33:21 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Subject": "[PATCH 07/35] libcamera: MappedFrameBuffer: Add\n\tMappedFrameBuffer::getPlaneFD()",
        "Date": "Wed, 11 Jun 2025 02:32:17 +0100",
        "Message-ID": "<20250611013245.133785-8-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250611013245.133785-1-bryan.odonoghue@linaro.org>",
        "References": "<20250611013245.133785-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": "Add MappedFrameBuffer::getPlaneFD() which takes a plane index and returns\nthe file descriptor associated with it.\n\nThis fd will be used to feed into eglCreateImageKHR for both texture\ncreation on upload and directly render-to-texture where the texture buffer\ncomes from the fd given to eglCreateImageKHR.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/mapped_framebuffer.h | 1 +\n src/libcamera/mapped_framebuffer.cpp            | 5 +++++\n 2 files changed, 6 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h\nindex 75ac2c8f..9a5355c7 100644\n--- a/include/libcamera/internal/mapped_framebuffer.h\n+++ b/include/libcamera/internal/mapped_framebuffer.h\n@@ -55,6 +55,7 @@ public:\n \tusing MapFlags = Flags<MapFlag>;\n \n \tMappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags);\n+\tint getPlaneFD(int plane);\n \n private:\n \tconst FrameBuffer *buffer_;\ndiff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp\nindex f5ee770c..d5f347d4 100644\n--- a/src/libcamera/mapped_framebuffer.cpp\n+++ b/src/libcamera/mapped_framebuffer.cpp\n@@ -242,4 +242,9 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)\n \tbuffer_ = buffer;\n }\n \n+int MappedFrameBuffer::getPlaneFD(int plane)\n+{\n+\treturn buffer_->planes()[plane].fd.get();\n+}\n+\n } /* namespace libcamera */\n",
    "prefixes": [
        "07/35"
    ]
}