Skip to content

Commit

Permalink
drm/amdgpu: fix postclose order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian König authored and Alex Deucher committed Aug 26, 2015
1 parent c7ae72c commit 02537d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
if (!fpriv)
return;

amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);

amdgpu_vm_fini(adev, &fpriv->vm);

idr_for_each_entry(&fpriv->bo_list_handles, list, handle)
Expand All @@ -568,8 +570,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
idr_destroy(&fpriv->bo_list_handles);
mutex_destroy(&fpriv->bo_list_lock);

amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);

kfree(fpriv);
file_priv->driver_priv = NULL;
}
Expand Down

0 comments on commit 02537d6

Please sign in to comment.