Skip to content

drm/nouveau: Support sync FDs and sync objects

Thierry Reding dri-devel nouveau oe-kbuild oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/nouveau: Split nouveau_fence_sync()drivers/gpu/drm/nouveau/dispnv04/crtc.c drivers/gpu/drm/nouveau/nouveau_bo.c drivers/gpu/drm/nouveau/nouveau_bo.h +3 more+57 -590 replies
2/6drm/nouveau: Add nouveau_fence_ref()drivers/gpu/drm/nouveau/nouveau_fence.c drivers/gpu/drm/nouveau/nouveau_fence.h+10 -00 replies
3/6drm/nouveau: Support fence FDs at kickoffdrivers/gpu/drm/nouveau/nouveau_drm.c drivers/gpu/drm/nouveau/nouveau_gem.c drivers/gpu/drm/nouveau/nouveau_gem.h +1 more+92 -40 replies
4/6drm/nouveau: Support sync FDs and syncobjsdrivers/gpu/drm/nouveau/nouveau_gem.c include/uapi/drm/nouveau_drm.h+167 -341 reply
5/6drm/nouveau: Support DMA fence arraysdrivers/gpu/drm/nouveau/nouveau_fence.c+28 -30 replies
6/6drm/nouveau: Allow zero pushbuffer submitsdrivers/gpu/drm/nouveau/nouveau_gem.c+99 -980 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] drm/nouveau: Support sync FDs and sync objects

From: Thierry Reding <[email protected]>

Hi,

This series implements a new IOCTL to submit push buffers that can optionally return a sync FD or sync object to userspace. This is useful in cases where userspace wants to synchronize operations between the GPU and another driver (such as KMS for display). Among other things this allows extensions such as eglDupNativeFenceFDANDROID to be implemented.

Note that patch 4 modifies the ABI introduced in patch 3 by allowing DRM sync objects to be passed rather than only sync FDs. It also allows any number of sync FDs/objects to be passed in or emitted. I think those are useful features, but I left them in a separate patch in case everybody else thinks that this won't be needed. If we decide to merge the new ABI then patch 4 should be squashed into patch 3.

The corresponding userspace changes can be found here:

libdrm: https://gitlab.freedesktop.org/tagr/drm/-/commits/nouveau-sync-fd-v2/
mesa: https://gitlab.freedesktop.org/tagr/mesa/-/commits/nouveau-sync-fd/

I've verified that this works with kmscube's --atomic mode and Weston.

Thierry

Thierry Reding (6):
drm/nouveau: Split nouveau_fence_sync()
drm/nouveau: Add nouveau_fence_ref()
drm/nouveau: Support fence FDs at kickoff
drm/nouveau: Support sync FDs and syncobjs
drm/nouveau: Support DMA fence arrays
drm/nouveau: Allow zero pushbuffer submits

 drivers/gpu/drm/nouveau/dispnv04/crtc.c |   4 +-
 drivers/gpu/drm/nouveau/nouveau_bo.c    |  38 ++-
 drivers/gpu/drm/nouveau/nouveau_bo.h    |   2 +
 drivers/gpu/drm/nouveau/nouveau_drm.c   |   1 +
 drivers/gpu/drm/nouveau/nouveau_fence.c |  90 +++---
 drivers/gpu/drm/nouveau/nouveau_fence.h |   3 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c   | 402 ++++++++++++++++++------
 drivers/gpu/drm/nouveau/nouveau_gem.h   |   2 +
 include/uapi/drm/nouveau_drm.h          |  23 ++
 9 files changed, 410 insertions(+), 155 deletions(-)
Signature · 1 line
2.28.0