summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShirish S <shirish.s@amd.com>2018-07-23 12:41:51 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-07-24 23:14:54 +0300
commit5f8181733f6e5f8a4447f844efe4bdab5ed6a30e (patch)
tree060882a5d01a70ea60b2ccfef930846aaff987c7 /drivers
parent456607d816d89a442a3d5ec98b02c8bc950b5228 (diff)
downloadlinux-5f8181733f6e5f8a4447f844efe4bdab5ed6a30e.tar.xz
drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up
This patch moves amdgpu_fbdev_set_suspend() to the beginning of suspend sequence. This is to ensure fbcon does not to write to the VRAM after GPU is powerd down. Signed-off-by: Shirish S <shirish.s@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 61981d0701b5..ec53d8f96d06 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2702,6 +2702,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
drm_kms_helper_poll_disable(dev);
+ if (fbcon)
+ amdgpu_fbdev_set_suspend(adev, 1);
+
if (!amdgpu_device_has_dc_support(adev)) {
/* turn off display hw */
drm_modeset_lock_all(dev);
@@ -2767,9 +2770,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
DRM_ERROR("amdgpu asic reset failed\n");
}
- if (fbcon)
- amdgpu_fbdev_set_suspend(adev, 1);
-
return 0;
}