Patch Detail
Show a patch.
GET /api/1.1/patches/4091/?format=api
{ "id": 4091, "url": "https://patchwork.libcamera.org/api/1.1/patches/4091/?format=api", "web_url": "https://patchwork.libcamera.org/patch/4091/", "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": "<20200619054123.19052-12-paul.elder@ideasonboard.com>", "date": "2020-06-19T05:41:17", "name": "[libcamera-devel,v2,11/17] v4l2: v4l2_camera_proxy: Reset buffer flags on reqbufs 0", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c5397a215bb98cc27c7705145ad5d346ed74cb0c", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/4091/mbox/", "series": [ { "id": 1017, "url": "https://patchwork.libcamera.org/api/1.1/series/1017/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1017", "date": "2020-06-19T05:41:06", "name": "Support v4l2-compliance", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1017/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/4091/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/4091/checks/", "tags": {}, "headers": { "Return-Path": "<paul.elder@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 75478603BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Jun 2020 07:41:59 +0200 (CEST)", "from jade.flets-east.jp (unknown\n\t[IPv6:2400:4051:61:600:e972:d773:e99a:4f79])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D78BA560;\n\tFri, 19 Jun 2020 07:41:57 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bB+uM5R5\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592545319;\n\tbh=W52v2DQg7LLqnYD/r4aRbVYa6Ehhg8VDTR30Lz3Zo18=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=bB+uM5R5z1k//GFldIY+n5yu2BZlLY0cd1/eZn3fI4a5tbKLAxeXpUpNXA0xiKaOk\n\toJji9RBKcXzNefslVuin99nXHpz2RQ8DnixnJKLyy/ZJA/hzAF2heH4wA4CgE4l2qp\n\tqdlV/yXApr/zjy6B6HSHK4OiOtxdi+MvHrLCEpj0=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 19 Jun 2020 14:41:17 +0900", "Message-Id": "<20200619054123.19052-12-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200619054123.19052-1-paul.elder@ideasonboard.com>", "References": "<20200619054123.19052-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 11/17] v4l2: v4l2_camera_proxy: Reset\n\tbuffer flags on reqbufs 0", "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>", "X-List-Received-Date": "Fri, 19 Jun 2020 05:41:59 -0000" }, "content": "VIDIOC_REQBUFS with count = 0 should also exhibit the same effects as\nVIDIOC_STREAMOFF if the stream is on. Mainly, the queued and done flags\nneed to be cleared. Do these in the handler for VIDIOC_REQBUFS.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nChanges in v2:\n- call only the necessary components, instead of\n V4L2CameraProxy::vidioc_streamoff\n---\n src/v4l2/v4l2_camera_proxy.cpp | 5 +++++\n 1 file changed, 5 insertions(+)", "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex 4d37662..ea9222e 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -467,6 +467,11 @@ int V4L2CameraProxy::vidioc_reqbufs(V4L2CameraFile *cf, struct v4l2_requestbuffe\n \tmemset(arg->reserved, 0, sizeof(arg->reserved));\n \n \tif (arg->count == 0) {\n+\t\tif (vcam_->isRunning()) {\n+\t\t\tfor (struct v4l2_buffer &buf : buffers_)\n+\t\t\t\tbuf.flags &= ~(V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE);\n+\t\t}\n+\n \t\tunlock(cf);\n \t\treturn freeBuffers();\n \t}\n", "prefixes": [ "libcamera-devel", "v2", "11/17" ] }