[media] vb2: add explicit fence user API
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Fri, 23 Mar 2018 09:34:10 +0000 (18:34 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:17 +0000 (20:22 +0300)
commit47a545ff451e0f1da277b13b975a6a6bc432ed37
treecedafba923c601dee87996323d4c178427ea9749
parent4c749d131b522f6f181956426233f7cda47dda8f
[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