Patch Detail
Show a patch.
GET /api/patches/3230/?format=api
{ "id": 3230, "url": "https://patchwork.libcamera.org/api/patches/3230/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3230/", "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": "<20200321003640.2156-3-laurent.pinchart@ideasonboard.com>", "date": "2020-03-21T00:36:35", "name": "[libcamera-devel,v2,2/7] libcamera: v4l2_controls: Cache query control information", "commit_ref": "2c6e6fbc961aaa345355fd92603e770b0221f0c4", "pull_url": null, "state": "accepted", "archived": false, "hash": "3fcba4a6d4b0ca8d0b36a367fd3174ead886536b", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3230/mbox/", "series": [ { "id": 754, "url": "https://patchwork.libcamera.org/api/series/754/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=754", "date": "2020-03-21T00:36:33", "name": "Add support for V4L2 array controls", "version": 2, "mbox": "https://patchwork.libcamera.org/series/754/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3230/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3230/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "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 6936D62BA9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 21 Mar 2020 01:36:51 +0100 (CET)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EA960A54;\n\tSat, 21 Mar 2020 01:36:50 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584751011;\n\tbh=+gpWLOTwj2hkj3rLy7bRt3VSRI+ILclZJ2h8Dx9BPF8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=HvtG1c2ypB3h+WMTs/vXx/aIIgIpfmvIYu06hsPDybiqUobxdDJW/ihJGV9Pp2lS6\n\tO0r2wYljM8P1p9hnsoy5PCbcWyYg1O6FOoF9VZSFOWaJRwL+lS9YJlXqvaGxBPhqe6\n\ty+h3rtoN3703MxKn9AU6YtnHtpGO1OgF6aJbV+gI=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 21 Mar 2020 02:36:35 +0200", "Message-Id": "<20200321003640.2156-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.24.1", "In-Reply-To": "<20200321003640.2156-1-laurent.pinchart@ideasonboard.com>", "References": "<20200321003640.2156-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 2/7] libcamera: v4l2_controls: Cache\n\tquery control information", "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": "Sat, 21 Mar 2020 00:36:52 -0000" }, "content": "From: Jacopo Mondi <jacopo@jmondi.org>\n\nCache the V4L2 control info retrieved with VIDIOC_QUERY_EXT_CTRL\nat control listing time for later use.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nChanges since v1:\n\n- Rename ctrlsInfo_ to controlInfo_\n- Add entry in controlInfo_ with emplace\n---\n src/libcamera/include/v4l2_device.h | 1 +\n src/libcamera/v4l2_device.cpp | 2 ++\n 2 files changed, 3 insertions(+)", "diff": "diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\nindex 6bfddefe336c..ce8edd98a01d 100644\n--- a/src/libcamera/include/v4l2_device.h\n+++ b/src/libcamera/include/v4l2_device.h\n@@ -48,6 +48,7 @@ private:\n \t\t\t const struct v4l2_ext_control *v4l2Ctrls,\n \t\t\t unsigned int count);\n \n+\tstd::map<unsigned int, struct v4l2_query_ext_ctrl> controlInfo_;\n \tstd::vector<std::unique_ptr<V4L2ControlId>> controlIds_;\n \tControlInfoMap controls_;\n \tstd::string deviceNode_;\ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 179476e9afad..7eded67cb47e 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -381,6 +381,8 @@ void V4L2Device::listControls()\n \t\t}\n \n \t\tcontrolIds_.emplace_back(std::make_unique<V4L2ControlId>(ctrl));\n+\t\tcontrolInfo_.emplace(ctrl.id, ctrl);\n+\n \t\tctrls.emplace(controlIds_.back().get(), V4L2ControlInfo(ctrl));\n \t}\n \n", "prefixes": [ "libcamera-devel", "v2", "2/7" ] }