drm/amdgpu: fix postclose order
The context needs to finish before everything else. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
c7ae72c01b
commit
02537d6362
@@ -560,6 +560,8 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
|
|||||||
if (!fpriv)
|
if (!fpriv)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);
|
||||||
|
|
||||||
amdgpu_vm_fini(adev, &fpriv->vm);
|
amdgpu_vm_fini(adev, &fpriv->vm);
|
||||||
|
|
||||||
idr_for_each_entry(&fpriv->bo_list_handles, list, handle)
|
idr_for_each_entry(&fpriv->bo_list_handles, list, handle)
|
||||||
@@ -568,8 +570,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
|
|||||||
idr_destroy(&fpriv->bo_list_handles);
|
idr_destroy(&fpriv->bo_list_handles);
|
||||||
mutex_destroy(&fpriv->bo_list_lock);
|
mutex_destroy(&fpriv->bo_list_lock);
|
||||||
|
|
||||||
amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);
|
|
||||||
|
|
||||||
kfree(fpriv);
|
kfree(fpriv);
|
||||||
file_priv->driver_priv = NULL;
|
file_priv->driver_priv = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user