linux/include/uapi/drm
Simon Ser c7a4722971 drm/syncobj: add IOCTL to register an eventfd
Introduce a new DRM_IOCTL_SYNCOBJ_EVENTFD IOCTL which signals an
eventfd from a syncobj.

This is useful for Wayland compositors to handle wait-before-submit.
Wayland clients can send a timeline point to the compositor
before the point has materialized yet, then compositors can wait
for the point to materialize via this new IOCTL.

The existing DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT IOCTL is not suitable
because it blocks. Compositors want to integrate the wait with
their poll(2)-based event loop.

Requirements for new uAPI:

- User-space patch: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4262
- IGT: https://lists.freedesktop.org/archives/igt-dev/2023-July/057893.html

v2:
- Wait for fence when flags is zero
- Improve documentation (Pekka)
- Rename IOCTL (Christian)
- Fix typo in drm_syncobj_add_eventfd() (Christian)

v3:
- Link user-space + IGT patches
- Add reference from overview docs

v4: fix IOCTL number conflict with GETFB2 (Nicholas Choi, Vitaly Prosyak)

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: James Jones <jajones@nvidia.com>
Cc: Austin Shafer <ashafer@nvidia.com>
Cc: Vitaly Prosyak <vprosyak@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230714111257.11940-1-contact@emersion.fr
2023-07-20 12:01:03 +02:00
..
amdgpu_drm.h drm/amdgpu: add new flag to AMDGPU_CTX_QUERY2 2023-06-09 09:20:55 -04:00
armada_drm.h
drm_fourcc.h drm/fourcc: define Intel Meteorlake related ccs modifiers 2023-05-15 11:33:12 +03:00
drm_mode.h drm: fix code style for embedded structs in hdr_metadata_infoframe 2023-06-23 15:52:41 +02:00
drm_sarea.h
drm.h drm/syncobj: add IOCTL to register an eventfd 2023-07-20 12:01:03 +02:00
etnaviv_drm.h drm/etnaviv: provide more ID values via GET_PARAM ioctl. 2021-01-22 12:33:57 +01:00
exynos_drm.h drm/exynos: Rename Exynos to lowercase 2020-01-21 09:09:42 +09:00
habanalabs_accel.h accel/habanalabs: add description to several info ioctls 2023-06-08 12:35:56 +03:00
i915_drm.h drm/i915: Allow user to set cache at BO creation 2023-06-07 17:32:15 +02:00
ivpu_accel.h accel/ivpu: Add command buffer submission logic 2023-01-19 11:12:00 +01:00
lima_drm.h drm/lima: support heap buffer creation 2020-01-27 22:01:09 +08:00
msm_drm.h drm/msm: Rename drm_msm_gem_submit_reloc::or in C++ code 2023-04-06 20:29:39 +03:00
nouveau_drm.h drm/nouveau: support synchronous pushbuf submission 2020-01-29 15:49:56 +10:00
omap_drm.h Revert "drm/omap: add OMAP_BO flags to affect buffer allocation" 2019-10-23 10:41:41 -04:00
panfrost_drm.h drm/panfrost: Remove type name from internal struct again 2022-11-07 15:35:43 +00:00
qaic_accel.h accel/qaic: Add uapi and core driver file 2023-04-06 08:23:03 +02:00
qxl_drm.h
radeon_drm.h
tegra_drm.h drm/tegra: Add new UAPI to header 2021-08-10 14:48:17 +02:00
v3d_drm.h drm/v3d: add multiple syncobjs support 2021-10-04 10:08:46 +01:00
vc4_drm.h
vgem_drm.h
virtgpu_drm.h drm/virtio: exbuf->fence_fd unmodified on interrupted wait 2023-02-06 20:10:56 +03:00
vmwgfx_drm.h drm/vmwgfx: Allow querying of the SVGA PCI id from the userspace 2022-03-11 13:29:35 -05:00