drm/nouveau: Add support for fence FDs
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | drm/nouveau: Split nouveau_fence_sync()drivers/ drivers/ drivers/ +3 more | +57 | 0 replies | |
| 2/3 | drm/nouveau: Support fence FDs at kickoffdrivers/ drivers/ drivers/ +1 more | +91 | 0 replies | |
| 3/3 | drm/nouveau: Support DMA fence arraysdrivers/ | +28 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] drm/nouveau: Add support for fence FDs
From: Thierry Reding <[email protected]>
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(-)
Signature · 1 line
2.15.1