Patch Detail
Show a patch.
GET /api/1.1/patches/17509/?format=api
{ "id": 17509, "url": "https://patchwork.libcamera.org/api/1.1/patches/17509/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17509/", "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": "<20221003190706.19816-3-laurent.pinchart@ideasonboard.com>", "date": "2022-10-03T19:07:06", "name": "[libcamera-devel,2/2] libcamera: v4l2_device: List controls when setting file descriptor", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "50f60b2fb7070845d0886588a13dd646e815e591", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17509/mbox/", "series": [ { "id": 3527, "url": "https://patchwork.libcamera.org/api/1.1/series/3527/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3527", "date": "2022-10-03T19:07:04", "name": "libcamera: v4l2_device: Fix control enumeration for M2M devices", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3527/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17509/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17509/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 145ADC327C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 3 Oct 2022 19:07:15 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 76C62601C8;\n\tMon, 3 Oct 2022 21:07:14 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 56F74601C2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Oct 2022 21:07:12 +0200 (CEST)", "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D2CB1519;\n\tMon, 3 Oct 2022 21:07:11 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664824034;\n\tbh=hufLD+mmkg7h3scBOVrcezyPVc3ZDGhFQNyJpBtuRWw=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=h5MlhdGgGP68BQgCq0KTVqvnUefz25mA3X1FOVYwea/XbzrcfwLZuliJ2V4msjM8H\n\t7qdCX/pkDktgkXkuy6Th3PfqKYblvywcPHbSNf9uy4pRGyz6O3jyBiPfLGqcDL+bK8\n\tZ1ojkZfpb8PbpAaajoi+nHBcp9UJO4vSE6KUFdVlvLlDFea57aU188z0JTcohqDd35\n\tSjyZuN7wR5IXUqQixyAi4JgADpJ4nA2XzpYdIcPl1W4AFgPHsY6Xkw1zLSAJHewWqi\n\tFftju+qi1WdqE8VYrwSJAMzazygigeOsIUiIDWPqMpNpTVS9RSI5BHUHvIt5hmvhip\n\tOU4g7LFUPE4ug==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664824032;\n\tbh=hufLD+mmkg7h3scBOVrcezyPVc3ZDGhFQNyJpBtuRWw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ayoaxPkRn2LG6g0qdJh+6GQTYmBcfkHSVg/v1omniZ4gVQggUvJDcScIR3RCobnHV\n\tn+tUwPs8XS1Gpflk5ft8l1LJU/3rkQQV0+b5h+jnm6+5UJ5VhRFzFN+0LP5wkMnS89\n\tFw7jW8YJq5V8N44dyac+a0Jqa3OoxNSeRrPpscZ4=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ayoaxPkR\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 3 Oct 2022 22:07:06 +0300", "Message-Id": "<20221003190706.19816-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20221003190706.19816-1-laurent.pinchart@ideasonboard.com>", "References": "<20221003190706.19816-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 2/2] libcamera: v4l2_device: List controls\n\twhen setting file descriptor", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The base V4L2Device class is bound to a video device node by either\nopen(), which opens the device node and creates a new file descriptor,\nor setFd(), which takes an already open file descriptor. The former\npopulates the V4L2Device instance controls, while the latter doesn't.\nThis prevents using controls on V4L2 M2M devices. Fix it by populating\ncontrols in setFd(), which is called by open().\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/v4l2_device.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex d7ebf63811b4..c4d40d7d0842 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -97,8 +97,6 @@ int V4L2Device::open(unsigned int flags)\n \n \tsetFd(std::move(fd));\n \n-\tlistControls();\n-\n \treturn 0;\n }\n \n@@ -129,6 +127,8 @@ int V4L2Device::setFd(UniqueFD fd)\n \tfdEventNotifier_->activated.connect(this, &V4L2Device::eventAvailable);\n \tfdEventNotifier_->setEnabled(false);\n \n+\tlistControls();\n+\n \treturn 0;\n }\n \n", "prefixes": [ "libcamera-devel", "2/2" ] }