summaryrefslogtreecommitdiff
path: root/Documentation/media/uapi/v4l/vidioc-qbuf.rst
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-09-01 14:29:14 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 16:57:29 +0300
commit15cd442e79e2a60a725ee5501e4ffb537698c802 (patch)
tree3a4b0356ca704fe66095ffeca6b9dc9a4be8c512 /Documentation/media/uapi/v4l/vidioc-qbuf.rst
parentffda0b4c2481b2a0faf634abccb1da0d0ba4eddb (diff)
downloadlinux-15cd442e79e2a60a725ee5501e4ffb537698c802.tar.xz
media: media-request: EPERM -> EACCES/EBUSY
If requests are not supported by the driver, then return EACCES, not EPERM. If you attempt to mix queueing buffers directly and using requests, then EBUSY is returned instead of EPERM: once a specific queueing mode has been chosen the queue is 'busy' if you attempt the other mode (i.e. direct queueing vs via a request). Signed-off-by: Hans Verkuil <hans.verkuil@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-qbuf.rst')
-rw-r--r--Documentation/media/uapi/v4l/vidioc-qbuf.rst18
1 files changed, 10 insertions, 8 deletions
diff --git a/Documentation/media/uapi/v4l/vidioc-qbuf.rst b/Documentation/media/uapi/v4l/vidioc-qbuf.rst
index 7bff69c15452..e619fc80a323 100644
--- a/Documentation/media/uapi/v4l/vidioc-qbuf.rst
+++ b/Documentation/media/uapi/v4l/vidioc-qbuf.rst
@@ -104,18 +104,18 @@ in use. Setting it means that the buffer will not be passed to the driver
until the request itself is queued. Also, the driver will apply any
settings associated with the request for this buffer. This field will
be ignored unless the ``V4L2_BUF_FLAG_REQUEST_FD`` flag is set.
-If the device does not support requests, then ``EPERM`` will be returned.
+If the device does not support requests, then ``EACCES`` will be returned.
If requests are supported but an invalid request file descriptor is given,
then ``EINVAL`` will be returned.
.. caution::
It is not allowed to mix queuing requests with queuing buffers directly.
- ``EPERM`` will be returned if the first buffer was queued directly and
+ ``EBUSY`` will be returned if the first buffer was queued directly and
then the application tries to queue a request, or vice versa.
For :ref:`memory-to-memory devices <codec>` you can specify the
``request_fd`` only for output buffers, not for capture buffers. Attempting
- to specify this for a capture buffer will result in an ``EPERM`` error.
+ to specify this for a capture buffer will result in an ``EACCES`` error.
Applications call the ``VIDIOC_DQBUF`` ioctl to dequeue a filled
(capturing) or displayed (output) buffer from the driver's outgoing
@@ -175,9 +175,11 @@ EPIPE
codecs if a buffer with the ``V4L2_BUF_FLAG_LAST`` was already
dequeued and no new buffers are expected to become available.
-EPERM
+EACCES
The ``V4L2_BUF_FLAG_REQUEST_FD`` flag was set but the device does not
- support requests. Or the first buffer was queued via a request, but
- the application now tries to queue it directly, or vice versa (it is
- not permitted to mix the two APIs). Or an attempt is made to queue a
- CAPTURE buffer to a request for a :ref:`memory-to-memory device <codec>`.
+ support requests for the given buffer type.
+
+EBUSY
+ The first buffer was queued via a request, but the application now tries
+ to queue it directly, or vice versa (it is not permitted to mix the two
+ APIs).