Skip to content

Commit 6dc8265

Browse files
committed
drm/amdgpu: always reset the asic in suspend (v2)
If the platform suspend happens to fail and the power rail is not turned off, the GPU will be in an unknown state on resume, so reset the asic so that it will be in a known good state on resume even if the platform suspend failed. v2: handle s0ix Acked-by: Luben Tuikov <[email protected]> Acked-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 4a70054 commit 6dc8265

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,10 @@ static int amdgpu_pmops_suspend(struct device *dev)
21702170
adev->in_s3 = true;
21712171
r = amdgpu_device_suspend(drm_dev, true);
21722172
adev->in_s3 = false;
2173-
2173+
if (r)
2174+
return r;
2175+
if (!adev->in_s0ix)
2176+
r = amdgpu_asic_reset(adev);
21742177
return r;
21752178
}
21762179

0 commit comments

Comments
 (0)