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 using the corresponding queue objects. EVENTFD remains notification-only. Changes in v10: - Signal SCRATCH eventfds using the actual queue object instead of queue_id. 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index 45981adbd7d3..7810d26bca17 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -904,6 +904,17 @@ 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) { + struct amdgpu_eventfd_mgr *eventfd_mgr; + + eventfd_mgr = amdgpu_userq_eventfd_mgr(queue->userq_mgr); + if (eventfd_mgr) + amdgpu_eventfd_signal(eventfd_mgr, + DRM_AMDGPU_EVENT_TYPE_SCRATCH, + queue); + } + continue; } -- 2.34.1
