summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2021-03-12 15:33:46 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-03-22 15:24:45 -0400
commit3aa2cacf79b37f703d6b8f7bd0252c8fe8c3f420 (patch)
tree4c262f8d93c3a1d65b7664ba37ad6c50c04e1912 /drivers/gpu
parentca8ee26d616b5e1818a0c69285d8f01feec35af9 (diff)
downloadlinux-3aa2cacf79b37f703d6b8f7bd0252c8fe8c3f420.tar.bz2
drm/amdgpu: move s0ix check into amdgpu_device_ip_suspend_phase2 (v3)
No functional change. v2: use correct dev v3: rework Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index d1028933f41b..a2e15c65fc8f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2721,6 +2721,11 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
{
int i, r;
+ if (adev->in_s0ix) {
+ amdgpu_gfx_state_change_set(adev, sGpuChangeState_D3Entry);
+ return 0;
+ }
+
for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
if (!adev->ip_blocks[i].status.valid)
continue;
@@ -3697,10 +3702,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
amdgpu_fence_driver_suspend(adev);
- if (!adev->in_s0ix || amdgpu_in_reset(adev))
- r = amdgpu_device_ip_suspend_phase2(adev);
- else
- amdgpu_gfx_state_change_set(adev, sGpuChangeState_D3Entry);
+ r = amdgpu_device_ip_suspend_phase2(adev);
/* evict remaining vram memory
* This second call to evict vram is to evict the gart page table
* using the CPU.