Patch Detail
Show a patch.
GET /api/patches/13039/?format=api
{ "id": 13039, "url": "https://patchwork.libcamera.org/api/patches/13039/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13039/", "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": "<20210719040152.43462-1-umang.jain@ideasonboard.com>", "date": "2021-07-19T04:01:52", "name": "[libcamera-devel,v2] libcamera: v4l2_videodevice: Avoid extra construction of Framebuffer", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "57a7bfd036485b6f3dcb9c9c60ee995d276a70e6", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13039/mbox/", "series": [ { "id": 2252, "url": "https://patchwork.libcamera.org/api/series/2252/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2252", "date": "2021-07-19T04:01:52", "name": "[libcamera-devel,v2] libcamera: v4l2_videodevice: Avoid extra construction of Framebuffer", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2252/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13039/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13039/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 018C9C322B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 19 Jul 2021 04:02:03 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B52D60278;\n\tMon, 19 Jul 2021 06:02:03 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4344A60278\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Jul 2021 06:02:02 +0200 (CEST)", "from perceval.ideasonboard.com (unknown [103.251.226.64])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A05CE465;\n\tMon, 19 Jul 2021 06:02:00 +0200 (CEST)" ], "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=\"usdTtzwm\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1626667321;\n\tbh=6yoyi4xyfSizDLE+Xg82nDKSJAUf5St8lWj95+gPpqU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=usdTtzwmZ/YABvJiE0XFtfkXRfDVWb6LdEprK1Xf4ITSdS+gZV1Zyak8m+oZjb1rL\n\toGUx6UdbYHUrXhsDdu6dhQvRivJPX9ybmD5tJ+ktqsVrdj+w+SqGI+AMrSICPfZ2F8\n\tncvSr4kCAAa2mIZFSeRnjeeMVdHW6hr+rovnWgp4=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 19 Jul 2021 09:31:52 +0530", "Message-Id": "<20210719040152.43462-1-umang.jain@ideasonboard.com>", "X-Mailer": "git-send-email 2.31.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2] libcamera: v4l2_videodevice: Avoid\n\textra construction of Framebuffer", "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": "While populating the V4L2BufferCache, avoid the extra construction of\nFrameBuffer, which is currently done by passing the vector of\nFrameBuffer::Planes. It is not wrong per se, but futile to have another\nconstruction of FrameBuffer from a copy of buffer->planes() for the\ncorresponding Entry.\n\nThis commit does not introduce any functional changes.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n- This is v2 of the initial series under the subject:\n - \"libcamera: v4l2_videodevice: Correctly populate V4L2BufferCache cache\"\n- (v1->v2) Revamp commit message entirely.\n---\n src/libcamera/v4l2_videodevice.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 3d2d99b4..da2af6a1 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -183,7 +183,7 @@ V4L2BufferCache::V4L2BufferCache(const std::vector<std::unique_ptr<FrameBuffer>>\n \tfor (const std::unique_ptr<FrameBuffer> &buffer : buffers)\n \t\tcache_.emplace_back(true,\n \t\t\t\t lastUsedCounter_.fetch_add(1, std::memory_order_acq_rel),\n-\t\t\t\t buffer->planes());\n+\t\t\t\t *buffer.get());\n }\n \n V4L2BufferCache::~V4L2BufferCache()\n", "prefixes": [ "libcamera-devel", "v2" ] }