[media] v4l: add 'unordered' flag to format description ioctl
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Fri, 23 Mar 2018 07:36:37 +0000 (16:36 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:28:41 +0000 (14:28 +0900)
For explicit synchronization it important for userspace to know if the
format being used by the driver can deliver the buffers back to
userspace
in the same order they were queued with QBUF.

Ordered streams fits nicely in a pipeline with DRM for example, where
ordered buffer are expected.

v2 - Improve documentation (Hans)

Change-Id: I5f0361407c7e50cf7eadb754bc977ed28de87527
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
include/uapi/linux/videodev2.h

index 019c513df217a27e81628879c30651df5cf9ec25..df8e039b9ac2e6576fd65c7e99618349e07cd91e 100644 (file)
@@ -116,6 +116,13 @@ one until ``EINVAL`` is returned.
       - This format is not native to the device but emulated through
        software (usually libv4l2), where possible try to use a native
        format instead for better performance.
+    * - ``V4L2_FMT_FLAG_UNORDERED``
+      - 0x0004
+      - This format doesn't guarantee ordered buffer handling. I.e. the order
+       in which buffers are dequeued with
+       :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` may be different
+       from the order in which they were queued with
+       :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`.
 
 
 Return Value
index 1c095b5a99c582b109ebdae286a567ad56ab76a2..a8ea632c14f02039381fa45760cab4bafcac0e2b 100644 (file)
@@ -709,6 +709,7 @@ struct v4l2_fmtdesc {
 
 #define V4L2_FMT_FLAG_COMPRESSED 0x0001
 #define V4L2_FMT_FLAG_EMULATED   0x0002
+#define V4L2_FMT_FLAG_UNORDERED  0x0004
 
        /* Frame Size and frame rate enumeration */
 /*