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. Changes in v8: - Use queue->qid instead of doorbell_index for queue-scoped event handling (Alex) Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Srinivasan Shanmugam <[email protected]> Change-Id: I30e31c6bd4504f308b001f8e92bdcdcd4c854274 --- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c index e9189f07c6dc..90945b078248 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c @@ -239,6 +239,13 @@ 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->qid); + found_hung_queue = true; atomic_inc(&adev->gpu_reset_counter); amdgpu_userq_fence_driver_force_completion(queue); -- 2.34.1
