dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/nouveau: Add support for fence FDs
@ 2018-01-11 22:15 Thierry Reding
       [not found] ` <20180111221546.28547-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2018-01-11 22:15 UTC (permalink / raw)
  To: Ben Skeggs
  Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

This small series of patches implements support for waiting on and
emitting fence FDs on kickoff. This enables explicit fencing and can be
used for example to synchronize buffer accesses between the display
engine and the GPU on Tegra.

The first patch lays the groundwork by splitting up nouveau_fence_sync()
to allow reuse. Patch 2 is where the interesting stuff happens. It adds
a new IOCTL (PUSHBUF2) that is a superset of the existing PUSHBUF IOCTL
and reuses most of the code while adding support for pre- and post-
fences.

Finally, the third patch teaches Nouveau how to deal with fence arrays,
which are usually a result of chaining together multiple dependent jobs.

I have corresponding userspace support for these in libdrm and Mesa:

	https://cgit.freedesktop.org/~tagr/drm/log/?h=nouveau-sync-fd
	https://cgit.freedesktop.org/~tagr/mesa/log/?h=nouveau-sync-fd

I'll send those patches out shortly. There's some more work depending on
these patches that I plan to send out in the coming days or weeks. The
final result allows Nouveau and Tegra DRM to negotiate for a framebuffer
modifier and then go into a render/scanout loop using fences for
synchronization. All of this was tested using a slightly modified
version of kmscube.

Thierry

Thierry Reding (3):
  drm/nouveau: Split nouveau_fence_sync()
  drm/nouveau: Support fence FDs at kickoff
  drm/nouveau: Support DMA fence arrays

 drivers/gpu/drm/nouveau/nouveau_bo.c      | 38 ++++++++++++++-
 drivers/gpu/drm/nouveau/nouveau_bo.h      |  2 +
 drivers/gpu/drm/nouveau/nouveau_display.c |  4 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c     |  1 +
 drivers/gpu/drm/nouveau/nouveau_fence.c   | 81 +++++++++++++------------------
 drivers/gpu/drm/nouveau/nouveau_fence.h   |  2 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c     | 80 ++++++++++++++++++++++++++++--
 drivers/gpu/drm/nouveau/nouveau_gem.h     |  2 +
 include/uapi/drm/nouveau_drm.h            | 14 ++++++
 9 files changed, 167 insertions(+), 57 deletions(-)

-- 
2.15.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-11 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11 22:15 [PATCH 0/3] drm/nouveau: Add support for fence FDs Thierry Reding
     [not found] ` <20180111221546.28547-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-11 22:15   ` [PATCH 1/3] drm/nouveau: Split nouveau_fence_sync() Thierry Reding
2018-01-11 22:15   ` [PATCH 2/3] drm/nouveau: Support fence FDs at kickoff Thierry Reding
2018-01-11 22:15   ` [PATCH 3/3] drm/nouveau: Support DMA fence arrays Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox