[PATCH 0/9] drm/syncobj: Add full-featured wait support

Jason Ekstrand jason at jlekstrand.net
Tue Aug 8 22:46:00 UTC 2017


This series contains the drm and i915 bits required to implement the
VK_KHR_external_semaphore and VK_KHR_external_fence extensions on top of
DRM sync objects.

Patches 1-3 are cleanups and fixes for the core syncobj APIs.

Patch 4 is the i915 patch that adds support for syncobj in the i915 driver.
I'm re-sending it because I've rebased the latest version on patches 1-3.

Patch 6 is technically not required by the end of the series but is needed
for i915 if we don't have patches 7-9.  I think it's a good and possibly
useful clean-up, but I'm more than willing to drop it in favor of 7-9.

Patch 7 adds a reset ioctl which allows the caller to reset the syncobj by
setting the fence to NULL.  This is needed to implement vkResetFences.

The real meat of the series is patches 8 and 9.  The previous wait
implementation would throw -EINVAL if you ever tried to wait on a syncobj
which did not yet have a dma_fence.  Patch 9 adds a new flag to the syncobj
which makes it so that, if it does not yet have a fence, it first waits for
a fence to show up and then waits on the fence.  This is needed to properly
implement VkWaitForFences behavior.

This series can be found as a branch here:

https://cgit.freedesktop.org/~jekstrand/linux/log/?h=drm-syncobj-wait-submit-v1

Patches to the Intel Vulkan driver to implement VK_KHR_external_fence on
top of this kernel interface can be found here:

https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/anv-external-fence

Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Dave Airlie <airlied at redhat.com>

Dave Airlie (1):
  drm/syncobj: add sync obj wait interface. (v8)

Jason Ekstrand (8):
  drm/syncobj: Rename fence_get to find_fence
  drm/syncobj: Lock around drm_syncobj::fence
  drm/syncobj: Remove file_private from replace_fence
  i915: Add support for drm syncobjs
  dma-buf/dma-fence: Allow wait_any_timeout without default_wait
  drm/syncobj: Add a reset ioctl
  drm/syncobj: Add a callback mechanism for replace_fence
  drm/syncobj: Allow wait for submit and signal behavior

 drivers/dma-buf/dma-fence.c                |   5 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c     |   5 +-
 drivers/gpu/drm/drm_internal.h             |   4 +
 drivers/gpu/drm/drm_ioctl.c                |   4 +
 drivers/gpu/drm/drm_syncobj.c              | 522 ++++++++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_drv.c            |   3 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 146 +++++++-
 include/drm/drm_syncobj.h                  |  46 ++-
 include/uapi/drm/drm.h                     |  19 ++
 include/uapi/drm/i915_drm.h                |  30 +-
 10 files changed, 752 insertions(+), 32 deletions(-)

-- 
2.5.0.400.gff86faf



More information about the dri-devel mailing list