This series introduces a render-node WAIT_EVENT ioctl for retrieving AMDGPU event records and their associated metadata.
WAIT_EVENT complements the EVENTFD notification interface. EVENTFD provides lightweight readiness notifications, while WAIT_EVENT allows userspace to retrieve the corresponding event type, queue identity, and event-specific metadata. This series builds on the render-node EVENTFD infrastructure and the EVENTFD producer series. The initial producer set records USERQ_EOP and QUEUE_RESET events by reusing the existing queue resolution and queue reset handling paths. Patches ======= 1. drm/amdgpu/uapi: Add WAIT_EVENT ioctl and metadata structures 2. drm/amdgpu: Add wait-event manager and per-file lifetime plumbing 3. drm/amdgpu: Remove queue-scoped WAIT_EVENT records on queue teardown 4. drm/amdgpu: Record USERQ_EOP WAIT_EVENT notifications 5. drm/amdgpu: Record QUEUE_RESET WAIT_EVENT notifications Changes since v10 ================= - Rebased on the latest user queue reset handling changes. - Updated the QUEUE_RESET producer to reuse the common queue-specific reset helper. - Kept device-level reset accounting and DRM wedged-event notification in the top-level recovery paths. Only compilation tested. Srinivasan Shanmugam (5): drm/amdgpu/uapi: Add WAIT_EVENT ioctl and metadata structures drm/amdgpu: Add wait-event manager and per-file lifetime plumbing drm/amdgpu: Remove queue-scoped WAIT_EVENT records on queue teardown drm/amdgpu: Record USERQ_EOP WAIT_EVENT notifications drm/amdgpu: Record QUEUE_RESET WAIT_EVENT notifications drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 35 +- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 2 + .../gpu/drm/amd/amdgpu/amdgpu_wait_event.c | 508 ++++++++++++++++++ .../gpu/drm/amd/amdgpu/amdgpu_wait_event.h | 101 ++++ include/uapi/drm/amdgpu_drm.h | 115 ++++ 9 files changed, 770 insertions(+), 4 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_wait_event.c create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_wait_event.h -- 2.34.1
