The first part of the series focuses on the core EVENTFD infrastructure, UAPI definitions, and queue-aware subscription support. Queue-scoped subscriptions are converted from using reusable UAPI queue identifiers to using refcounted queue object references, ensuring stable internal tracking and correct lifetime management.
Changes since v10: * Rework queue-aware EVENTFD subscriptions to resolve queue_id into refcounted queue objects before calling EVENTFD helpers. * Resolve eventfd file descriptors into eventfd contexts in the ioctl path before calling EVENTFD helpers. * Store queue pointers instead of reusable queue_id values in EVENTFD subscriptions. * Add explicit cleanup of queue-scoped subscriptions when queues are removed from the USERQ manager. * Keep the event_id to event_type rename localized to the UAPI patch so later patches focus only on queue lifetime handling. * Clarify EVENTFD comments and documentation to emphasize that EVENTFD provides notification only and does not carry payloads. The event producers that signal these notifications (USERQ EOP, QUEUE_RESET, MEMORY_EXCEPTION, SCRATCH, etc.) are planned as follow-up patches once the core infrastructure receives review. Only compilation tested. Thanks! Srinivasan Shanmugam (5): drm/amdgpu: Add render-node EVENTFD manager core drm/amdgpu: Embed eventfd manager in amdgpu_fpriv drm/amdgpu: Add helper to access the fpriv eventfd manager drm/amdgpu/uapi: Define kernel event types for EVENTFD subscriptions drm/amdgpu: Use queue references for queue-aware EVENTFD subscriptions drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_eventfd.c | 434 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_eventfd.h | 73 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 101 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 25 + drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 5 +- .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 1 + .../drm/amd/amdgpu/amdgpu_userq_internal.h | 36 ++ include/uapi/drm/amdgpu_drm.h | 43 ++ 11 files changed, 726 insertions(+), 4 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_eventfd.c create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_eventfd.h create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_userq_internal.h base-commit: d27c2dad1c9cbe1032a149db375b79f6dd1de03b -- 2.34.1
