]> git.baikalelectronics.ru Git - kernel.git/commit
drm/syncobj: Add a signal ioctl (v3)
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 28 Aug 2017 21:10:28 +0000 (14:10 -0700)
committerDave Airlie <airlied@redhat.com>
Tue, 29 Aug 2017 00:16:25 +0000 (10:16 +1000)
commit42305345969b8a9f66b007973cbd395138b694c8
tree516a051cc991d6f093f9533c345870acfc6f1352
parent8464fe5b4b41deaf2148569ed37655847c0c34a1
drm/syncobj: Add a signal ioctl (v3)

This IOCTL provides a mechanism for userspace to trigger a sync object
directly.  There are other ways that userspace can trigger a syncobj
such as submitting a dummy batch somewhere or hanging on to a triggered
sync_file and doing an import.  This just provides an easy way to
manually trigger the sync object without weird hacks.

The motivation for this IOCTL is Vulkan fences.  Vulkan lets you create
a fence already in the signaled state so that you can wait on it
immediatly without stalling.  We could also handle this with a new
create flag to ask the driver to create a syncobj that is already
signaled but the IOCTL seemed a bit cleaner and more generic.

v2:
 - Take an array of sync objects (Dave Airlie)
v3:
 - Throw -EINVAL if pad != 0

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_internal.h
drivers/gpu/drm/drm_ioctl.c
drivers/gpu/drm/drm_syncobj.c
include/uapi/drm/drm.h