[PATCH] drm/amd: Fail the suspend sequence if the GPU doesn't use S3 or S0i3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As part of the S3 suspend sequence dGPUs will evict VRAM.  If there is
high memory pressure at this time, there is a chance this fails.

systemd has a policy to try to "fall back" from S3 to s2idle and see
if that works.  When under high memory pressure this also fails, and
harder.  Really we don't want this flow to be possible.

Fail the sequence if the dGPU won't be suspended using either method.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3476
Link: https://github.com/systemd/systemd/issues/25151
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 802debd8d9f0..6a5a3e132319 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2562,7 +2562,7 @@ static int amdgpu_pmops_suspend(struct device *dev)
 	else if (amdgpu_acpi_is_s3_active(adev))
 		adev->in_s3 = true;
 	if (!adev->in_s0ix && !adev->in_s3)
-		return 0;
+		return -EINVAL;
 	return amdgpu_device_suspend(drm_dev, true);
 }
 
-- 
2.45.2




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux