Signal SCRATCH EVENTFD subscriptions when user queue restore detects missing VA mappings.
The INVALID_VA queue state is set when user queue restore finds that required VA mappings are no longer present. Reuse this point to signal queue-scoped SCRATCH 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]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index d5ea69e7a67c..5c2d8151cfb6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -888,6 +888,14 @@ amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr) drm_file_err(uq_mgr->file, "trying restore queue without va mapping\n"); queue->state = AMDGPU_USERQ_STATE_INVALID_VA; + + if (queue->userq_mgr && + queue->userq_mgr->eventfd_mgr) + amdgpu_eventfd_signal( + queue->userq_mgr->eventfd_mgr, + DRM_AMDGPU_EVENT_TYPE_SCRATCH, + queue->qid); + continue; } -- 2.34.1
