summaryrefslogtreecommitdiffstats
path: root/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2018-08-23 06:14:12 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 09:45:58 -0400
commit34b41472465b1b5a2c6c63255431fb2c1a450af1 (patch)
tree4d69723646404eeada387d7ac8c46a62fddd64aa /Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst
parent757fdb51c14fda221ccb6999a865f7f895c79750 (diff)
downloadlinux-0-day-34b41472465b1b5a2c6c63255431fb2c1a450af1.tar.gz
linux-0-day-34b41472465b1b5a2c6c63255431fb2c1a450af1.tar.xz
media: media-request: return -EINVAL for invalid request_fds
Instead of returning -ENOENT when a request_fd was not found (VIDIOC_QBUF and VIDIOC_G/S/TRY_EXT_CTRLS), we now return -EINVAL. This is in line with what we do when invalid dmabuf fds are passed to e.g. VIDIOC_QBUF. Also document that EINVAL is returned for invalid m.fd values, we never documented that. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst')
-rw-r--r--Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst18
1 files changed, 8 insertions, 10 deletions
diff --git a/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst b/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst
index 771fd11612773..9c56a9b6e98a4 100644
--- a/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst
+++ b/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst
@@ -101,8 +101,8 @@ then the controls are not applied immediately when calling
:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, but instead are applied by
the driver for the buffer associated with the same request.
If the device does not support requests, then ``EPERM`` will be returned.
-If requests are supported but an invalid request FD is given, then
-``ENOENT`` will be returned.
+If requests are supported but an invalid request file descriptor is given,
+then ``EINVAL`` will be returned.
An attempt to call :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` for a
request that has already been queued will result in an ``EBUSY`` error.
@@ -301,8 +301,8 @@ still cause this situation.
- File descriptor of the request to be used by this operation. Only
valid if ``which`` is set to ``V4L2_CTRL_WHICH_REQUEST_VAL``.
If the device does not support requests, then ``EPERM`` will be returned.
- If requests are supported but an invalid request FD is given, then
- ``ENOENT`` will be returned.
+ If requests are supported but an invalid request file descriptor is
+ given, then ``EINVAL`` will be returned.
* - __u32
- ``reserved``\ [1]
- Reserved for future extensions.
@@ -378,11 +378,13 @@ appropriately. The generic error codes are described at the
EINVAL
The struct :c:type:`v4l2_ext_control` ``id`` is
- invalid, the struct :c:type:`v4l2_ext_controls`
+ invalid, or the struct :c:type:`v4l2_ext_controls`
``which`` is invalid, or the struct
:c:type:`v4l2_ext_control` ``value`` was
inappropriate (e.g. the given menu index is not supported by the
- driver). This error code is also returned by the
+ driver), or the ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL``
+ but the given ``request_fd`` was invalid.
+ This error code is also returned by the
:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls if two or
more control values are in conflict.
@@ -409,7 +411,3 @@ EACCES
EPERM
The ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL`` but the
device does not support requests.
-
-ENOENT
- The ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL`` but the
- the given ``request_fd`` was invalid.