From 08442fe23565f8e8093bac62325e66ce269ee329 Mon Sep 17 00:00:00 2001 From: Harry Wentland Date: Tue, 27 Feb 2018 13:59:48 -0500 Subject: [PATCH] drm/amd/display: Use atomic crtc_disable for DC on shutdown drm_crtc_force_disable_all should only be called for non-atomic drivers. Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 59b69a22ed83..30b6bd652651 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2074,8 +2074,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_atomic_helper_shutdown(adev->ddev); + else + drm_crtc_force_disable_all(adev->ddev); + } amdgpu_ib_pool_fini(adev); amdgpu_fence_driver_fini(adev); -- 2.14.1