Patch Detail
Show a patch.
GET /api/patches/11712/?format=api
{ "id": 11712, "url": "https://patchwork.libcamera.org/api/patches/11712/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11712/", "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": "<20210325134231.1400051-5-kieran.bingham@ideasonboard.com>", "date": "2021-03-25T13:42:22", "name": "[libcamera-devel,v3,02/11] libcamera: buffer: Break friendship with Request", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0bc553843e0330efa658d8227704a425b7821d9a", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": { "id": 11, "url": "https://patchwork.libcamera.org/api/users/11/?format=api", "username": "kbingham", "first_name": "Kieran", "last_name": "Bingham", "email": "kieran.bingham@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/11712/mbox/", "series": [ { "id": 1832, "url": "https://patchwork.libcamera.org/api/series/1832/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1832", "date": "2021-03-25T13:42:18", "name": "[libcamera-devel,v3,01/11] utils: ipc: proxy: Track IPA with a state machine", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1832/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11712/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11712/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 39537C32E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Mar 2021 13:42:44 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D715268D91;\n\tThu, 25 Mar 2021 14:42:42 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1416F68D66\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Mar 2021 14:42:37 +0100 (CET)", "from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 976909E7;\n\tThu, 25 Mar 2021 14:42:36 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Bpm/M6lo\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1616679756;\n\tbh=hQ0sgFCoscJlltfHBgSTK6SP8Xn/x/dsP5cWWB5UW/0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Bpm/M6loVcx5vy07eUGNdxT1n4nvZL/xYQdbUMH7GBR2Er8cLhqfBwSqnTwZL2RFo\n\ti/8kCtVq8lh4EpXXxMB6WKw/mOtol6ulO4OX1cKxuLJsWqsvBp3T8YuQA3ihccPoJ7\n\t+IPM2IESNDxQQVBMwJgMtLkHHa1oJqTsZ3uXJ1MI=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Thu, 25 Mar 2021 13:42:22 +0000", "Message-Id": "<20210325134231.1400051-5-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210325134231.1400051-1-kieran.bingham@ideasonboard.com>", "References": "<20210325134231.1400051-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 02/11] libcamera: buffer: Break\n\tfriendship with Request", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The FrameBuffer class is only friends with Request so that the request\ncan be associated with the buffers.\n\nFrameBuffer already has a helper to setRequest(), so let's use that\ndirectly instead.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/buffer.h | 1 -\n src/libcamera/request.cpp | 9 +++++----\n 2 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\nindex 302fe3d3e86b..620f8a66f6a2 100644\n--- a/include/libcamera/buffer.h\n+++ b/include/libcamera/buffer.h\n@@ -56,7 +56,6 @@ public:\n private:\n \tLIBCAMERA_DISABLE_COPY_AND_MOVE(FrameBuffer)\n \n-\tfriend class Request; /* Needed to update request_. */\n \tfriend class V4L2VideoDevice; /* Needed to update metadata_. */\n \n \tstd::vector<Plane> planes_;\ndiff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\nindex 0071667e4a2c..3ad83f3b8418 100644\n--- a/src/libcamera/request.cpp\n+++ b/src/libcamera/request.cpp\n@@ -118,8 +118,9 @@ void Request::reuse(ReuseFlag flags)\n \tpending_.clear();\n \tif (flags & ReuseBuffers) {\n \t\tfor (auto pair : bufferMap_) {\n-\t\t\tpair.second->request_ = this;\n-\t\t\tpending_.insert(pair.second);\n+\t\t\tFrameBuffer *buffer = pair.second;\n+\t\t\tbuffer->setRequest(this);\n+\t\t\tpending_.insert(buffer);\n \t\t}\n \t} else {\n \t\tbufferMap_.clear();\n@@ -187,7 +188,7 @@ int Request::addBuffer(const Stream *stream, FrameBuffer *buffer)\n \t\treturn -EEXIST;\n \t}\n \n-\tbuffer->request_ = this;\n+\tbuffer->setRequest(this);\n \tpending_.insert(buffer);\n \tbufferMap_[stream] = buffer;\n \n@@ -294,7 +295,7 @@ bool Request::completeBuffer(FrameBuffer *buffer)\n \tint ret = pending_.erase(buffer);\n \tASSERT(ret == 1);\n \n-\tbuffer->request_ = nullptr;\n+\tbuffer->setRequest(nullptr);\n \n \tif (buffer->metadata().status == FrameMetadata::FrameCancelled)\n \t\tcancelled_ = true;\n", "prefixes": [ "libcamera-devel", "v3", "02/11" ] }