summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorShirish S <shirish.s@amd.com>2018-07-23 15:11:51 +0530
committerAlex Deucher <alexander.deucher@amd.com>2018-07-24 15:14:54 -0500
commit5f8181733f6e5f8a4447f844efe4bdab5ed6a30e (patch)
tree060882a5d01a70ea60b2ccfef930846aaff987c7 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent456607d816d89a442a3d5ec98b02c8bc950b5228 (diff)
downloadop-kernel-dev-5f8181733f6e5f8a4447f844efe4bdab5ed6a30e.zip
op-kernel-dev-5f8181733f6e5f8a4447f844efe4bdab5ed6a30e.tar.gz
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/gpu/drm/amd/amdgpu/amdgpu_device.c')
-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 61981d0..ec53d8f 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;
}
OpenPOWER on IntegriCloud