aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2016-07-22 14:13:11 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-29 14:37:05 -0400
commitcd437e37cb836805604d8b607a28ee6769d800ef (patch)
treeb842a802cd65452079bcd22081d74ad997e29c6e
parent2ff2bf1e5cd731e26293e08404f06bc8314480dc (diff)
drm/amdgpu: free handles after fini the context
This will make sure all the submissions from different contexts gets finished, and then we close the session and free up the handles. This will fix the issue that session clean-up is not get done properly, when with the command `kill -9' Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index a8efbb54423f..d942654a1de0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -584,6 +584,9 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
584 584
585 amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr); 585 amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);
586 586
587 amdgpu_uvd_free_handles(adev, file_priv);
588 amdgpu_vce_free_handles(adev, file_priv);
589
587 amdgpu_vm_fini(adev, &fpriv->vm); 590 amdgpu_vm_fini(adev, &fpriv->vm);
588 591
589 idr_for_each_entry(&fpriv->bo_list_handles, list, handle) 592 idr_for_each_entry(&fpriv->bo_list_handles, list, handle)
@@ -608,10 +611,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
608void amdgpu_driver_preclose_kms(struct drm_device *dev, 611void amdgpu_driver_preclose_kms(struct drm_device *dev,
609 struct drm_file *file_priv) 612 struct drm_file *file_priv)
610{ 613{
611 struct amdgpu_device *adev = dev->dev_private;
612
613 amdgpu_uvd_free_handles(adev, file_priv);
614 amdgpu_vce_free_handles(adev, file_priv);
615} 614}
616 615
617/* 616/*