This RFC series adds scratch/runtime error producer coverage to the WAIT_EVENT path.
This is a follow-up to earlier WAIT_EVENT discussions, where WAIT_EVENT serves as the metadata and consumption path, while EVENTFD is used for notification-only wakeups. This patch wires the INVALID_VA user queue state into WAIT_EVENT. When user queue restore detects missing or invalid VA mappings, the queue is marked as AMDGPU_USERQ_STATE_INVALID_VA. This condition is now used to emit a WAIT_EVENT scratch record. The queue's doorbell_index is used as the queue identifier. Notes - Compile-tested only This is a minimal follow-up to extend producer coverage Srinivasan Shanmugam (11): drm/amdgpu/uapi: Add WAIT_EVENT ioctl and metadata structures drm/amdgpu: Add wait-event manager and per-file lifetime plumbing drm/amdgpu: Register WAIT_EVENT ioctl drm/amdgpu/gfx11: Queue USERQ_EOP records for WAIT_EVENT drm/amdgpu/uapi: Extend WAIT_EVENT with optional condition wait fields drm/amdgpu: Add userspace condition support to WAIT_EVENT drm/amdgpu: document WAIT_EVENT condition semantics drm/amdgpu: Add queue reset records to WAIT_EVENT drm/amdgpu: Detect queue reset in WAIT_EVENT drm/amdgpu: Add memory exception records to WAIT_EVENT drm/amdgpu: Add scratch records to WAIT_EVENT drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- 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 | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 36 +- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 4 + .../gpu/drm/amd/amdgpu/amdgpu_wait_event.c | 400 ++++++++++++++++++ .../gpu/drm/amd/amdgpu/amdgpu_wait_event.h | 95 +++++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 + drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 15 +- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 8 + include/uapi/drm/amdgpu_drm.h | 127 ++++++ 12 files changed, 691 insertions(+), 9 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
