[PATCH] drm/amdgpu: Use atomic function to disable crtcs with dc enabled

Andrey Grodzovsky Andrey.Grodzovsky at amd.com
Wed Mar 14 17:56:10 UTC 2018


Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>

Andrey


On 03/14/2018 01:51 PM, mikita.lipski at amd.com wrote:
> From: Mikita Lipski <mikita.lipski at amd.com>
>
> This change fixes the deadlock when unloading the driver with displays
> connected.
>
> Signed-off-by: Mikita Lipski <mikita.lipski at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 65584f6..b4911911 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2081,9 +2081,12 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>   
>   	DRM_INFO("amdgpu: finishing device.\n");
>   	adev->shutdown = true;
> -	if (adev->mode_info.mode_config_initialized)
> -		drm_crtc_force_disable_all(adev->ddev);
> -
> +	if (adev->mode_info.mode_config_initialized){
> +		if (!amdgpu_device_has_dc_support(adev))
> +			drm_crtc_force_disable_all(adev->ddev);
> +		else
> +			drm_atomic_helper_shutdown(adev->ddev);
> +	}
>   	amdgpu_ib_pool_fini(adev);
>   	amdgpu_fence_driver_fini(adev);
>   	amdgpu_fbdev_fini(adev);



More information about the amd-gfx mailing list