Signal queue reset EVENTFD subscriptions when hung user queues are detected.
The user queue reset path already identifies affected queues and marks them as AMDGPU_USERQ_STATE_HUNG. Reuse this point to signal queue-scoped QUEUE_RESET eventfd subscriptions keyed by doorbell index. EVENTFD remains notification-only. Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Srinivasan Shanmugam <[email protected]> --- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c index d12cd1b7790b..af29c1d8d699 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c @@ -254,6 +254,14 @@ static int mes_userq_detect_and_reset(struct amdgpu_device *adev, for (i = 0; i < hung_db_num; i++) { if (queue->doorbell_index == db_array[i]) { queue->state = AMDGPU_USERQ_STATE_HUNG; + + if (queue->userq_mgr && + queue->userq_mgr->eventfd_mgr) + amdgpu_eventfd_signal( + queue->userq_mgr->eventfd_mgr, + DRM_AMDGPU_EVENT_TYPE_QUEUE_RESET, + queue->doorbell_index); + found_hung_queue = true; atomic_inc(&adev->gpu_reset_counter); amdgpu_userq_fence_driver_force_completion(queue); -- 2.34.1
