[media] vb2: add explicit fence user API
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Fri, 23 Mar 2018 09:34:10 +0000 (18:34 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:28:42 +0000 (14:28 +0900)
commit1440f492df4c1168bb6002949d40eb49ccb48823
treedb844980a0f1762f7b804d1406742b4402a582e1
parent70ce52e483c184faa079577cf32b17fe237b0a4b
[media] vb2: add explicit fence user API

Turn the reserved2 field into fence_fd that we will use to send
an in-fence to the kernel or return an out-fence from the kernel to
userspace.

Two new flags were added, V4L2_BUF_FLAG_IN_FENCE, that should be used
when sending a fence to the kernel to be waited on, and
V4L2_BUF_FLAG_OUT_FENCE, to ask the kernel to give back an out-fence.

v6: - big improvement on doc (Hans Verkuil)

v5:
- keep using reserved2 field for cpia2
- set fence_fd to 0 for now, for compat with userspace(Mauro)

v4:
- make it a union with reserved2 and fence_fd (Hans Verkuil)

v3:
- make the out_fence refer to the current buffer (Hans Verkuil)

v2: add documentation

Change-Id: Ic52ac856718b716c0eda3cae983e32817f09991e
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Documentation/media/uapi/v4l/buffer.rst
drivers/media/v4l2-core/v4l2-compat-ioctl32.c
include/uapi/linux/videodev2.h