Patch Detail
Show a patch.
GET /api/1.1/patches/22907/?format=api
{ "id": 22907, "url": "https://patchwork.libcamera.org/api/1.1/patches/22907/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22907/", "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": "<20250303151634.734176-1-barnabas.pocze@ideasonboard.com>", "date": "2025-03-03T15:16:34", "name": "[v1] libcamera: request: addBuffer(): Do not destroy fence on failure", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "88f2c074ff9ac63a54ee6c380e8fdcfd0dd4ff21", "submitter": { "id": 216, "url": "https://patchwork.libcamera.org/api/1.1/people/216/?format=api", "name": "Barnabás Pőcze", "email": "barnabas.pocze@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22907/mbox/", "series": [ { "id": 5035, "url": "https://patchwork.libcamera.org/api/1.1/series/5035/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5035", "date": "2025-03-03T15:16:34", "name": "[v1] libcamera: request: addBuffer(): Do not destroy fence on failure", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5035/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22907/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22907/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 2EAAEC3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 3 Mar 2025 15:16:40 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 95A4D687EB;\n\tMon, 3 Mar 2025 16:16:39 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DE07368777\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Mar 2025 16:16:37 +0100 (CET)", "from pb-laptop.local (185.221.143.4.nat.pool.zt.hu [185.221.143.4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 66F98169\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Mar 2025 16:15:06 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IX9Bp6dZ\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1741014906;\n\tbh=NvoZMa3UUzzZ/6/e3z1ZQfZ6iob6Kkxxmojt96hB8Sg=;\n\th=From:To:Subject:Date:From;\n\tb=IX9Bp6dZblpCsqD4dweUbJzfMaTfKvXHNhQpK6OEc1XhSnQfSqrxUUmlIQieUZWue\n\tLZQOCg6ufj39WrZ0M3W37MznkIFrF9umXNjH/HevMCSAi9YciB95IBvRcwGzKMn9kD\n\t2IS8LSLALjmQR+Jgqr33HlSntV/j/UEOr0nOK4Ws=", "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH v1] libcamera: request: addBuffer(): Do not destroy fence on\n\tfailure", "Date": "Mon, 3 Mar 2025 16:16:34 +0100", "Message-ID": "<20250303151634.734176-1-barnabas.pocze@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "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": "Take the unique pointer to the `Fence` object by rvalue reference\nso that it is not destroyed if the function returns an error code\nand does not take ownership of the unique pointer.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/request.h | 2 +-\n src/libcamera/request.cpp | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/include/libcamera/request.h b/include/libcamera/request.h\nindex e214a9d13..0c5939f7b 100644\n--- a/include/libcamera/request.h\n+++ b/include/libcamera/request.h\n@@ -53,7 +53,7 @@ public:\n \tControlList &metadata() { return *metadata_; }\n \tconst BufferMap &buffers() const { return bufferMap_; }\n \tint addBuffer(const Stream *stream, FrameBuffer *buffer,\n-\t\t std::unique_ptr<Fence> fence = nullptr);\n+\t\t std::unique_ptr<Fence> &&fence = {});\n \tFrameBuffer *findBuffer(const Stream *stream) const;\n \n \tuint32_t sequence() const;\ndiff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\nindex b206ac132..7d02f09fd 100644\n--- a/src/libcamera/request.cpp\n+++ b/src/libcamera/request.cpp\n@@ -468,7 +468,7 @@ void Request::reuse(ReuseFlag flags)\n * \\retval -EINVAL The buffer does not reference a valid Stream\n */\n int Request::addBuffer(const Stream *stream, FrameBuffer *buffer,\n-\t\t std::unique_ptr<Fence> fence)\n+\t\t std::unique_ptr<Fence> &&fence)\n {\n \tif (!stream) {\n \t\tLOG(Request, Error) << \"Invalid stream reference\";\n", "prefixes": [ "v1" ] }