Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd437e37 authored by Leo Liu's avatar Leo Liu Committed by Alex Deucher
Browse files

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: default avatarLeo Liu <leo.liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2ff2bf1e
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -584,6 +584,9 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,


	amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);
	amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);


	amdgpu_uvd_free_handles(adev, file_priv);
	amdgpu_vce_free_handles(adev, file_priv);

	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)
@@ -608,10 +611,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
void amdgpu_driver_preclose_kms(struct drm_device *dev,
void amdgpu_driver_preclose_kms(struct drm_device *dev,
				struct drm_file *file_priv)
				struct drm_file *file_priv)
{
{
	struct amdgpu_device *adev = dev->dev_private;

	amdgpu_uvd_free_handles(adev, file_priv);
	amdgpu_vce_free_handles(adev, file_priv);
}
}


/*
/*