aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorMikita Lipski <mikita.lipski@amd.com>2018-03-14 13:41:29 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-03-15 11:46:37 -0400
commitd1bb88e078c2aec6a8456d7eb28ca572c06e12f3 (patch)
tree9c508936b3da76cd90141256d6d63bc5c38932b0 /drivers/gpu/drm/amd/amdgpu
parent2681bc79eeb640562c932007bfebbbdc55bf6a7d (diff)
drm/amdgpu: Use atomic function to disable crtcs with dc enabled
This change fixes the deadlock when unloading the driver with displays connected. Signed-off-by: Mikita Lipski <mikita.lipski@amd.com> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c9
1 files 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 af1b879a9ee9..66cb10cdc7c3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2063,9 +2063,12 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
2063 2063
2064 DRM_INFO("amdgpu: finishing device.\n"); 2064 DRM_INFO("amdgpu: finishing device.\n");
2065 adev->shutdown = true; 2065 adev->shutdown = true;
2066 if (adev->mode_info.mode_config_initialized) 2066 if (adev->mode_info.mode_config_initialized){
2067 drm_crtc_force_disable_all(adev->ddev); 2067 if (!amdgpu_device_has_dc_support(adev))
2068 2068 drm_crtc_force_disable_all(adev->ddev);
2069 else
2070 drm_atomic_helper_shutdown(adev->ddev);
2071 }
2069 amdgpu_ib_pool_fini(adev); 2072 amdgpu_ib_pool_fini(adev);
2070 amdgpu_fence_driver_fini(adev); 2073 amdgpu_fence_driver_fini(adev);
2071 amdgpu_fbdev_fini(adev); 2074 amdgpu_fbdev_fini(adev);