Show a patch.

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

{
    "id": 27127,
    "url": "https://patchwork.libcamera.org/api/patches/27127/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/27127/",
    "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": "<20260629163017.863145-49-barnabas.pocze@ideasonboard.com>",
    "date": "2026-06-29T16:30:11",
    "name": "[RFC,v1,48/54] libcamera: request: Remove `ReuseFlag`",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d0c47c31650de706cbd34c2e37eb24edce62fae4",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/27127/mbox/",
    "series": [
        {
            "id": 6025,
            "url": "https://patchwork.libcamera.org/api/series/6025/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6025",
            "date": "2026-06-29T16:29:23",
            "name": "libcamera: Split requests and buffers",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/6025/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/27127/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/27127/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 EB92FC3303\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 29 Jun 2026 16:31:39 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 811CE65FB9;\n\tMon, 29 Jun 2026 18:31:39 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D7CF65F6E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Jun 2026 18:30:32 +0200 (CEST)",
            "from pb-laptop.local (185.221.140.128.nat.pool.zt.hu\n\t[185.221.140.128])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DFD891044\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Jun 2026 18:29:48 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Iz+4dHQM\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782750589;\n\tbh=bUYC0r8e9bSYJn6QBkh+LrbSDZUz/lx8pFWTcpQa/lA=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Iz+4dHQMIvbyAfOKfYsZ7wCGGfBhCwnqxX6dZXBafpfvE+O5JRCRbVSQYhhzqfFex\n\t9mJKiPxefDSPjmjLVo87EFMTMUt/FJt0w7l+Mlxkm3zZV+36Y8j811xYEko6LxP4Bn\n\tcbxPeyeeiLuINnSoYzaO3lXkU/Zsxk0xA+wS+R74=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[RFC PATCH v1 48/54] libcamera: request: Remove `ReuseFlag`",
        "Date": "Mon, 29 Jun 2026 18:30:11 +0200",
        "Message-ID": "<20260629163017.863145-49-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.54.0",
        "In-Reply-To": "<20260629163017.863145-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20260629163017.863145-1-barnabas.pocze@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "They are no longer used, so they can be removed.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n .../guides/application-developer.rst          |  9 --------\n include/libcamera/request.h                   |  7 +------\n src/libcamera/request.cpp                     | 21 ++-----------------\n src/py/libcamera/py_main.cpp                  |  1 -\n 4 files changed, 3 insertions(+), 35 deletions(-)",
    "diff": "diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst\nindex a9620ca862..9c6191406d 100644\n--- a/Documentation/guides/application-developer.rst\n+++ b/Documentation/guides/application-developer.rst\n@@ -477,15 +477,6 @@ libcamera repository.\n \n .. _FileSink class: https://git.libcamera.org/libcamera/libcamera.git/tree/src/apps/cam/file_sink.cpp\n \n-With the handling of this request completed, it is possible to re-use the\n-request and the associated buffers and re-queue it to the camera\n-device:\n-\n-.. code:: cpp\n-\n-   request->reuse(Request::ReuseBuffers);\n-   camera->queueRequest(request);\n-\n Request queueing\n ----------------\n \ndiff --git a/include/libcamera/request.h b/include/libcamera/request.h\nindex c86259c59b..462611da59 100644\n--- a/include/libcamera/request.h\n+++ b/include/libcamera/request.h\n@@ -37,17 +37,12 @@ public:\n \t\tRequestCancelled,\n \t};\n \n-\tenum ReuseFlag {\n-\t\tDefault = 0,\n-\t\tReuseBuffers = (1 << 0),\n-\t};\n-\n \tusing BufferMap = std::map<const Stream *, FrameBuffer *>;\n \n \tRequest(Camera *camera, uint64_t cookie = 0);\n \t~Request();\n \n-\tvoid reuse(ReuseFlag flags = Default);\n+\tvoid reuse();\n \n \tControlList &controls() { return controls_; }\n \tconst ControlList &metadata() const;\ndiff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\nindex 4fb8c0a659..5d28ac80df 100644\n--- a/src/libcamera/request.cpp\n+++ b/src/libcamera/request.cpp\n@@ -193,18 +193,6 @@ void Request::Private::reset()\n  * The request has been cancelled due to capture stop\n  */\n \n-/**\n- * \\enum Request::ReuseFlag\n- * Flags to control the behavior of Request::reuse()\n- * \\var Request::Default\n- * Don't reuse buffers\n- * \\var Request::ReuseBuffers\n- * Reuse the buffers that were previously added by addBuffer()\n- *\n- * \\note Fences associated with the buffers are not reused.\n- *  This flag should not be used if fences are used.\n- */\n-\n /**\n  * \\typedef Request::BufferMap\n  * \\brief A map of Stream to FrameBuffer pointers\n@@ -245,21 +233,16 @@ Request::~Request()\n \n /**\n  * \\brief Reset the request for reuse\n- * \\param[in] flags Indicate whether or not to reuse the buffers\n  *\n  * Reset the status and controls associated with the request, to allow it to\n  * be reused and requeued without destruction. This function shall be called\n  * prior to queueing the request to the camera, in lieu of constructing a new\n- * request. The application can reuse the buffers that were previously added\n- * to the request via addBuffer() by setting \\a flags to ReuseBuffers.\n+ * request.\n  */\n-void Request::reuse(ReuseFlag flags)\n+void Request::reuse()\n {\n \tLIBCAMERA_TRACEPOINT(request_reuse, this);\n \n-\tif (flags)\n-\t\tLOG(Request, Fatal) << \"NOT IMPLEMENTED\";\n-\n \t_d()->reset();\n \n \tbufferMap_.clear();\ndiff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp\nindex 26b348ef0e..7196bb0f6d 100644\n--- a/src/py/libcamera/py_main.cpp\n+++ b/src/py/libcamera/py_main.cpp\n@@ -135,7 +135,6 @@ PYBIND11_MODULE(_libcamera, m)\n \tauto pyControlInfo = py::class_<ControlInfo>(m, \"ControlInfo\");\n \tauto pyRequest = py::class_<Request, std::unique_ptr<Request, RequestDeleter>>(m, \"Request\");\n \tauto pyRequestStatus = py::enum_<Request::Status>(pyRequest, \"Status\");\n-\tauto pyRequestReuse = py::enum_<Request::ReuseFlag>(pyRequest, \"Reuse\");\n \tauto pyFrameMetadata = py::class_<FrameMetadata>(m, \"FrameMetadata\");\n \tauto pyFrameMetadataStatus = py::enum_<FrameMetadata::Status>(pyFrameMetadata, \"Status\");\n \tauto pyFrameMetadataPlane = py::class_<FrameMetadata::Plane>(pyFrameMetadata, \"Plane\");\n",
    "prefixes": [
        "RFC",
        "v1",
        "48/54"
    ]
}