[RFC PATCH 0/3] drm/v3d: add multiple in/out syncobjs support

Melissa Wen mwen at igalia.com
Wed Aug 4 14:47:47 UTC 2021


Hi,

Currently, v3d only supports single in/out syncobj per submission (in
v3d_submit_cl we have two in_sync, one for bin and another for render
job); however, Vulkan queue submit operations expect multiples wait and
signal semaphores. This series extending v3d interface and job
dependency operations to handle more than one in/out syncobj.

The first patch just decouples the steps to add job dependency from the
job init code since the operation repeats for every syncobj that a job
should wait before starting. So, we can just reuse it when handling
multiples wait for semaphores in the third patch of this series.

The second patch extends our interface by using a generic extension.
We chose this approach inspired by i915_user_extension[1] and
amd_cs_chunks[2] to give a little more flexibility in adding other
submission features in the future. Therefore, the list of extensions
will work as a hub of features that use an id to determine the
corresponding feature data type.

With this base, the third patch adds multiple wait/signal semaphores
support. For this, we add to the list of the generic extensions a new
data type (drm_v3d_multi_sync) that points to two arrays of syncobjs
(in/out) and also determines (flags) if the dependencies must be added
to the bin job or render job (in the case of v3d_submit_cl). An
auxiliary struct (v3d_submit_ext) is used when parsing submission
extensions. Finally, we reserve some space in the semaphore struct
(drm_v3d_sem) to accommodate timeline semaphores that we aim to add
support soon (same reason for already defining v3d_submit_outsync).

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/drivers/gpu/drm/i915/i915_user_extensions.c?id=9d1305ef80b95dde0337106ed8b826604e2155ad
[2] https://cgit.freedesktop.org/drm/drm-misc/tree/include/uapi/drm/amdgpu_drm.h#n556

PS: I'm cc'ing more people to get any comments for the generic
extension approach and the multiple semaphores support too.

Melissa Wen (3):
  drm/v3d: decouple adding job dependencies from job init
  drm/v3d: add generic ioctl extension
  drm/v3d: add multiple syncobjs support

 drivers/gpu/drm/v3d/v3d_drv.c |   7 +-
 drivers/gpu/drm/v3d/v3d_drv.h |  14 ++
 drivers/gpu/drm/v3d/v3d_gem.c | 304 +++++++++++++++++++++++++++++-----
 include/uapi/drm/v3d_drm.h    |  76 ++++++++-
 4 files changed, 355 insertions(+), 46 deletions(-)

-- 
2.30.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210804/1381e368/attachment.sig>


More information about the dri-devel mailing list