diff options
| author | Mikita Lipski <[email protected]> | 2018-03-14 17:41:29 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2018-03-21 04:43:42 +0000 |
| commit | ff97cba8c1b24f6017e16ca6facca3c3f32d2c00 (patch) | |
| tree | 247210b1c60fc8226618869a847f458a8c0617eb /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | drm/amd/amdgpu: fix offset into page with amdgpu_iomem debugfs file (diff) | |
| download | kernel-ff97cba8c1b24f6017e16ca6facca3c3f32d2c00.tar.gz kernel-ff97cba8c1b24f6017e16ca6facca3c3f32d2c00.zip | |
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 <[email protected]>
Reviewed-by: Andrey Grodzovsky <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 |
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 beabb90e595a..cdf7a6cde603 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2446,9 +2446,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_pm_sysfs_fini(adev); |
