mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
drm/amdgpu: validate userq hw unmap status for destroying userq
Before destroying the userq buffer object, it requires validating the userq HW unmap status and ensuring the userq is unmapped from hardware. If the user HW unmap failed, then it needs to reset the queue for reusing. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
11aaec3566
commit
8b38bf3883
1 changed files with 5 additions and 0 deletions
|
|
@ -307,6 +307,11 @@ amdgpu_userq_destroy(struct drm_file *filp, int queue_id)
|
|||
debugfs_remove_recursive(queue->debugfs_queue);
|
||||
#endif
|
||||
r = amdgpu_userq_unmap_helper(uq_mgr, queue);
|
||||
/*TODO: It requires a reset for userq hw unmap error*/
|
||||
if (unlikely(r != AMDGPU_USERQ_STATE_UNMAPPED)) {
|
||||
drm_warn(adev_to_drm(uq_mgr->adev), "trying to destroy a HW mapping userq\n");
|
||||
queue->state = AMDGPU_USERQ_STATE_HUNG;
|
||||
}
|
||||
amdgpu_userq_cleanup(uq_mgr, queue, queue_id);
|
||||
mutex_unlock(&uq_mgr->userq_mutex);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue