Patch Detail
Show a patch.
GET /api/1.1/patches/9503/?format=api
{ "id": 9503, "url": "https://patchwork.libcamera.org/api/1.1/patches/9503/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9503/", "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": "<20200907071604.8355-3-david.plowman@raspberrypi.com>", "date": "2020-09-07T07:15:57", "name": "[libcamera-devel,v8,2/8] libcamera: Allow access to v4l2_query_ext_ctrl structure for a V4L2 control", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c0a78b451df3372fc5d6a91cea3a1cda464e3500", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9503/mbox/", "series": [ { "id": 1268, "url": "https://patchwork.libcamera.org/api/1.1/series/1268/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1268", "date": "2020-09-07T07:15:55", "name": "2D transforms", "version": 8, "mbox": "https://patchwork.libcamera.org/series/1268/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9503/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9503/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 482AEBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 7 Sep 2020 07:16:12 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0A2E262B8A;\n\tMon, 7 Sep 2020 09:16:12 +0200 (CEST)", "from mail-wm1-x341.google.com (mail-wm1-x341.google.com\n\t[IPv6:2a00:1450:4864:20::341])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C40262B58\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 7 Sep 2020 09:16:10 +0200 (CEST)", "by mail-wm1-x341.google.com with SMTP id w2so13305583wmi.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 07 Sep 2020 00:16:10 -0700 (PDT)", "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tb2sm25543636wmh.47.2020.09.07.00.16.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 07 Sep 2020 00:16:09 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"P90MQyHk\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=JhpNMFUIDtZB0hDN1oH6vxGz9TYm4xD/PMsCnHNrOV8=;\n\tb=P90MQyHkVWqv97oGx4vd51ieezOP6kiK3FNtJudQ/6GpxxqimFsS4SbntPVThWcyFm\n\tWHJZZqbgPpeqTtrbgcZJgDf/tS6W1ovK3WqnV3Qw0UxHLvXpBMtP+pp23cIAgHc9smPU\n\tpJRpCxyWy/u2fqbTK06KYs7y4wWJmUfg4Ry2pYFF40BJ/IghAQ5kmApDMuID9xqQBWou\n\tomLSatve5QBWxmd2VoY/XXxlSgABVX4x47Lwru5rwfP4y5iFQ/2vBM4Q0su0kxXjPGyE\n\tKYYAsj76dRwKKpHHqlbk34Uu3jQyCQ0bKbpoKIhCnzqP9tKH/7Ug/O70oAPDJPgV8XDB\n\tGhnA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=JhpNMFUIDtZB0hDN1oH6vxGz9TYm4xD/PMsCnHNrOV8=;\n\tb=qvvNqDvTrlW3LTppnQ6rSvCCd/rVKH8MyWd71Bxs1nb4UyLL3Kq9n65aTLAwEBNEI3\n\tDSH19j+Agtv2rb/GE0ED9a+0mpvssBH3hilnINvJ0tpLUNoVdnD86ZzfZpU4n3ZtpMtq\n\tlLSHZmZ8aYqb6GwLs2I7Oa1zJN2XwT/vbBxsv2PGBCFXIa4QlqL+Ulj5sdkYyOd8CIUE\n\tlMiPo1nZrCJVSNcz9fbRpDbWDIDiUobYTVyQw0g4AmylxCuH5An/mlxEywOwF0FAvHxF\n\tAZsiCNprQOsmB49ZkfNYHEaqajL7JLMJvmzdn+D5fAbZw8YARIiK/vS+CmdIjdI8d8q2\n\tyIOw==", "X-Gm-Message-State": "AOAM530avLhxhVSPh/6aAMc69Ot4gWJUMdajXklzb3qBOGkEegHWaLuz\n\topZDIIyqfDDtOGGjYxBHffoYFEWGC64jSQ==", "X-Google-Smtp-Source": "ABdhPJxbGV5oyeKySSo9NAVZJQIdUYPqkDyHrYqjW/KTzimiOwkHTVjwQ8Y0UM/71axXa26OY/5+sg==", "X-Received": "by 2002:a7b:cb4e:: with SMTP id\n\tv14mr20122721wmj.140.1599462969526; \n\tMon, 07 Sep 2020 00:16:09 -0700 (PDT)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 7 Sep 2020 08:15:57 +0100", "Message-Id": "<20200907071604.8355-3-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200907071604.8355-1-david.plowman@raspberrypi.com>", "References": "<20200907071604.8355-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v8 2/8] libcamera: Allow access to\n\tv4l2_query_ext_ctrl structure for a V4L2 control", "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 V4L2Device::controlInfo method simply returns a pointer to the\nv4l2_query_ext_ctrl structure for the given control, which has already\nbeen retrieved and stored.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/internal/v4l2_device.h | 2 ++\n src/libcamera/v4l2_device.cpp | 15 +++++++++++++++\n 2 files changed, 17 insertions(+)", "diff": "diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\nindex 3b605aa..722fb72 100644\n--- a/include/libcamera/internal/v4l2_device.h\n+++ b/include/libcamera/internal/v4l2_device.h\n@@ -29,6 +29,8 @@ public:\n \tControlList getControls(const std::vector<uint32_t> &ids);\n \tint setControls(ControlList *ctrls);\n \n+\tconst struct v4l2_query_ext_ctrl *controlInfo(uint32_t id) const;\n+\n \tconst std::string &deviceNode() const { return deviceNode_; }\n \tstd::string devicePath() const;\n \ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 65830d4..31d4dad 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -353,6 +353,21 @@ int V4L2Device::setControls(ControlList *ctrls)\n \treturn ret;\n }\n \n+/**\n+ * \\brief Retrieve the v4l2_query_ext_ctrl information for the given control\n+ * \\param[in] id The V4L2 control id\n+ * \\return A pointer to the v4l2_query_ext_ctrl structure for the given\n+ * control, or a null pointer if not found\n+ */\n+const struct v4l2_query_ext_ctrl *V4L2Device::controlInfo(uint32_t id) const\n+{\n+\tconst auto it = controlInfo_.find(id);\n+\tif (it == controlInfo_.end())\n+\t\treturn nullptr;\n+\n+\treturn &it->second;\n+}\n+\n /**\n * \\brief Retrieve the device path in sysfs\n *\n", "prefixes": [ "libcamera-devel", "v8", "2/8" ] }