[PATCH] drm/amdgpu: fix unload driver fail

Christian König ckoenig.leichtzumerken at gmail.com
Fri May 24 10:15:49 UTC 2019


Am 24.05.19 um 11:52 schrieb Emily Deng:
> dc_destroy should be called amdgpu_cgs_destroy_device,
> as it will use cgs context to read or write registers.
>
> Signed-off-by: Emily Deng <Emily.Deng at amd.com>

Acked-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index fd04217..f558c9c 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -616,6 +616,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
>   static void amdgpu_dm_fini(struct amdgpu_device *adev)
>   {
>   	amdgpu_dm_destroy_drm_device(&adev->dm);
> +
> +	/* DC Destroy TODO: Replace destroy DAL */
> +	if (adev->dm.dc)
> +		dc_destroy(&adev->dm.dc);
>   	/*
>   	 * TODO: pageflip, vlank interrupt
>   	 *
> @@ -630,9 +634,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
>   		mod_freesync_destroy(adev->dm.freesync_module);
>   		adev->dm.freesync_module = NULL;
>   	}
> -	/* DC Destroy TODO: Replace destroy DAL */
> -	if (adev->dm.dc)
> -		dc_destroy(&adev->dm.dc);
>   
>   	mutex_destroy(&adev->dm.dc_lock);
>   



More information about the amd-gfx mailing list