Patch Detail
Show a patch.
GET /api/patches/26632/?format=api
{ "id": 26632, "url": "https://patchwork.libcamera.org/api/patches/26632/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26632/", "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": "<20260505082310.604873-1-barnabas.pocze@ideasonboard.com>", "date": "2026-05-05T08:23:10", "name": "[v1] libcamera: framebuffer: Reword documentation about cookie", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "84ce5b6e60f2ad08b44489d3f7167298dbb2ee07", "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/26632/mbox/", "series": [ { "id": 5906, "url": "https://patchwork.libcamera.org/api/series/5906/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5906", "date": "2026-05-05T08:23:10", "name": "[v1] libcamera: framebuffer: Reword documentation about cookie", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5906/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26632/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26632/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 38113BDCB5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 5 May 2026 08:23:16 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D80446301E;\n\tTue, 5 May 2026 10:23:14 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4ACA062010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 May 2026 10:23:13 +0200 (CEST)", "from pb-laptop.local (185.221.140.217.nat.pool.zt.hu\n\t[185.221.140.217])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BDF1AC71\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 May 2026 10:23:10 +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=\"rTrwcIIC\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1777969390;\n\tbh=2dueRvIDcNFrXhqITo8J26f6nOm7UZc+iSzx2ZHVzj0=;\n\th=From:To:Subject:Date:From;\n\tb=rTrwcIICUEbmUaDXMSF4zAlWZH5FFk+dREDXRX/Yd0wnFYYuD9285PClXJbi2NkNm\n\tkZsq+6CTwnlyKIAI9zRYRAVRdxogZzVaJxej9r4jh0oHCwduhtFvQbRvtHVb+lue+n\n\tyrbOyIoratJcbNHMlyc1LO9Hqh1qJ6XoXBZ4HHz8=", "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH v1] libcamera: framebuffer: Reword documentation about cookie", "Date": "Tue, 5 May 2026 10:23:10 +0200", "Message-ID": "<20260505082310.604873-1-barnabas.pocze@ideasonboard.com>", "X-Mailer": "git-send-email 2.54.0", "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": "First of all, move most of the documentation next to the `setCookie()` function\nto have it in a single place.\n\nSecondly, make it clear that applications using a `FrameBufferAllocator` are\nconsidered to be owners of the allocated FrameBuffer objects, and they may\nfreely manage the cookies of those frame buffers.\n\nCloses: https://gitlab.freedesktop.org/camera/libcamera/-/work_items/331\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/libcamera/framebuffer.cpp | 32 +++++++++++++++++---------------\n 1 file changed, 17 insertions(+), 15 deletions(-)\n\n--\n2.54.0", "diff": "diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp\nindex 765dab95a..acf5b5b33 100644\n--- a/src/libcamera/framebuffer.cpp\n+++ b/src/libcamera/framebuffer.cpp\n@@ -236,12 +236,6 @@ FrameBuffer::Private::~Private()\n * during the processing of a queued capture request, and is valid from the\n * completion of the buffer as signaled by Camera::bufferComplete() until the\n * FrameBuffer is either reused in a new request or deleted.\n- *\n- * The creator of a FrameBuffer (application, IPA or pipeline handler) may\n- * associate to it an integer cookie for any private purpose. The cookie may be\n- * set when creating the FrameBuffer, and updated at any time with setCookie().\n- * The cookie is transparent to the libcamera core and shall only be set by the\n- * creator of the FrameBuffer. This mechanism supplements the Request cookie.\n */\n\n /**\n@@ -399,12 +393,7 @@ const FrameMetadata &FrameBuffer::metadata() const\n\n /**\n * \\brief Retrieve the cookie\n- *\n- * The cookie belongs to the creator of the FrameBuffer, which controls its\n- * lifetime and value.\n- *\n * \\sa setCookie()\n- *\n * \\return The cookie\n */\n uint64_t FrameBuffer::cookie() const\n@@ -416,10 +405,23 @@ uint64_t FrameBuffer::cookie() const\n * \\brief Set the cookie\n * \\param[in] cookie Cookie to set\n *\n- * The cookie belongs to the creator of the FrameBuffer. Its value may be\n- * modified at any time with this function. Applications and IPAs shall not\n- * modify the cookie value of buffers they haven't created themselves. The\n- * libcamera core never modifies the buffer cookie.\n+ * The creator (and only the creator) of the FrameBuffer may store an arbitrary\n+ * 64-bit integer value in the FrameBuffer, this value is called the cookie.\n+ * It may be retrieved or set at any time, and is guaranteed not to be modified\n+ * by the libcamera core. This mechanism is similar to the \\ref Request cookie.\n+ *\n+ * An application using a \\ref FrameBufferAllocator is considered to be the creator\n+ * of the allocated FrameBuffer objects, and thus it may manage the cookie as it\n+ * sees fit.\n+ *\n+ * \\internal\n+ * Similar rules apply to pipeline handlers and IPA modules, that is, they can only\n+ * manage the cookies of FrameBuffer objects that they have created, with the exception\n+ * that any FrameBuffer returned by \\ref PipelineHandler::exportFrameBuffers() is considered\n+ * to have been created by the application, and thus its cookie shall not be modified.\n+ * \\endinternal\n+ *\n+ * \\sa cookie()\n */\n void FrameBuffer::setCookie(uint64_t cookie)\n {\n", "prefixes": [ "v1" ] }