Patch Detail
Show a patch.
GET /api/patches/3708/?format=api
{ "id": 3708, "url": "https://patchwork.libcamera.org/api/patches/3708/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3708/", "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": "<20200507151253.2951492-7-jacopo@jmondi.org>", "date": "2020-05-07T15:12:53", "name": "[libcamera-devel,v7,6/6] v4l: document VIDIOC_SUBDEV_QUERYCAP", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "d31eb018ca91905daba1f93581521ac54b42d028", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/3708/mbox/", "series": [ { "id": 885, "url": "https://patchwork.libcamera.org/api/series/885/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=885", "date": "2020-05-07T15:12:47", "name": "media: Register read-only sub-dev devnode", "version": 7, "mbox": "https://patchwork.libcamera.org/series/885/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3708/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3708/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 501CB603EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 7 May 2020 17:09:59 +0200 (CEST)", "from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 417AB200021;\n\tThu, 7 May 2020 15:09:57 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "linux-media@vger.kernel.org,\n\tlibcamera-devel@lists.libcamera.org", "Cc": "Jacopo Mondi <jacopo@jmondi.org>, mchehab@kernel.org,\n\thverkuil-cisco@xs4all.nl, sakari.ailus@linux.intel.com,\n\tandrey.konovalov@linaro.org, laurent.pinchart@ideasonboard.com,\n\tHans Verkuil <hans.verkuil@cisco.com>", "Date": "Thu, 7 May 2020 17:12:53 +0200", "Message-Id": "<20200507151253.2951492-7-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.1", "In-Reply-To": "<20200507151253.2951492-1-jacopo@jmondi.org>", "References": "<20200507151253.2951492-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v7 6/6] v4l: document\n\tVIDIOC_SUBDEV_QUERYCAP", "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": "Thu, 07 May 2020 15:09:59 -0000" }, "content": "From: Hans Verkuil <hans.verkuil@cisco.com>\n\nAdd documentation for the new VIDIOC_SUBDEV_QUERYCAP ioctl.\n\nAcked-by: Sakari Ailus <sakari.ailus@linux.intel.com>\nSigned-off-by: Hans Verkuil <hans.verkuil@cisco.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n .../userspace-api/media/v4l/user-func.rst | 1 +\n .../media/v4l/vidioc-subdev-querycap.rst | 112 ++++++++++++++++++\n 2 files changed, 113 insertions(+)\n create mode 100644 Documentation/userspace-api/media/v4l/vidioc-subdev-querycap.rst", "diff": "diff --git a/Documentation/userspace-api/media/v4l/user-func.rst b/Documentation/userspace-api/media/v4l/user-func.rst\nindex f235f88efe891..bf77c842718e5 100644\n--- a/Documentation/userspace-api/media/v4l/user-func.rst\n+++ b/Documentation/userspace-api/media/v4l/user-func.rst\n@@ -78,6 +78,7 @@ Function Reference\n vidioc-subdev-g-fmt\n vidioc-subdev-g-frame-interval\n vidioc-subdev-g-selection\n+ vidioc-subdev-querycap\n vidioc-subscribe-event\n func-mmap\n func-munmap\ndiff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-querycap.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-querycap.rst\nnew file mode 100644\nindex 0000000000000..0371a76321af8\n--- /dev/null\n+++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-querycap.rst\n@@ -0,0 +1,112 @@\n+.. Permission is granted to copy, distribute and/or modify this\n+.. document under the terms of the GNU Free Documentation License,\n+.. Version 1.1 or any later version published by the Free Software\n+.. Foundation, with no Invariant Sections, no Front-Cover Texts\n+.. and no Back-Cover Texts. A copy of the license is included at\n+.. Documentation/userspace-api/media/fdl-appendix.rst.\n+..\n+.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections\n+\n+.. _VIDIOC_SUBDEV_QUERYCAP:\n+\n+****************************\n+ioctl VIDIOC_SUBDEV_QUERYCAP\n+****************************\n+\n+Name\n+====\n+\n+VIDIOC_SUBDEV_QUERYCAP - Query sub-device capabilities\n+\n+\n+Synopsis\n+========\n+\n+.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERYCAP, struct v4l2_subdev_capability *argp )\n+ :name: VIDIOC_SUBDEV_QUERYCAP\n+\n+\n+Arguments\n+=========\n+\n+``fd``\n+ File descriptor returned by :ref:`open() <func-open>`.\n+\n+``argp``\n+ Pointer to struct :c:type:`v4l2_subdev_capability`.\n+\n+\n+Description\n+===========\n+\n+All V4L2 sub-devices support the ``VIDIOC_SUBDEV_QUERYCAP`` ioctl. It is used to\n+identify kernel devices compatible with this specification and to obtain\n+information about driver and hardware capabilities. The ioctl takes a pointer to\n+a struct :c:type:`v4l2_subdev_capability` which is filled by the driver. When\n+the driver is not compatible with this specification the ioctl returns\n+``ENOTTY`` error code.\n+\n+.. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}|\n+\n+.. c:type:: v4l2_subdev_capability\n+\n+.. flat-table:: struct v4l2_subdev_capability\n+ :header-rows: 0\n+ :stub-columns: 0\n+ :widths: 3 4 20\n+\n+ * - __u32\n+ - ``version``\n+ - Version number of the driver.\n+\n+\tThe version reported is provided by the V4L2 subsystem following the\n+\tkernel numbering scheme. However, it may not always return the same\n+\tversion as the kernel if, for example, a stable or\n+\tdistribution-modified kernel uses the V4L2 stack from a newer kernel.\n+\n+\tThe version number is formatted using the ``KERNEL_VERSION()``\n+\tmacro:\n+ * - :cspan:`2`\n+\n+\t``#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))``\n+\n+\t``__u32 version = KERNEL_VERSION(0, 8, 1);``\n+\n+\t``printf (\"Version: %u.%u.%u\\\\n\",``\n+\n+\t``(version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);``\n+ * - __u32\n+ - ``capabilities``\n+ - Sub-device capabilities of the opened device, see\n+\t:ref:`subdevice-capabilities`.\n+ * - __u32\n+ - ``reserved``\\ [14]\n+ - Reserved for future extensions. Set to 0 by the V4L2 core.\n+\n+.. tabularcolumns:: |p{6cm}|p{2.2cm}|p{8.8cm}|\n+\n+.. _subdevice-capabilities:\n+\n+.. cssclass:: longtable\n+\n+.. flat-table:: Sub-Device Capabilities Flags\n+ :header-rows: 0\n+ :stub-columns: 0\n+ :widths: 3 1 4\n+\n+ * - V4L2_SUBDEV_CAP_RO_SUBDEV\n+ - 0x00000001\n+ - The sub-device device node is registered in read-only mode.\n+\tAccess to the sub-device ioctls that modify the device state is\n+\trestricted. Refer to each individual subdevice ioctl documentation\n+\tfor a description of which restrictions apply to a read-only sub-device.\n+\n+Return Value\n+============\n+\n+On success 0 is returned, on error -1 and the ``errno`` variable is set\n+appropriately. The generic error codes are described at the\n+:ref:`Generic Error Codes <gen-errors>` chapter.\n+\n+ENOTTY\n+ The device node is not a V4L2 sub-device.\n", "prefixes": [ "libcamera-devel", "v7", "6/6" ] }