Skip to contentSkip to conversation

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

PATCH New Mario Limonciello 1 participant 1 message Jul 10, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index 802debd8d9f0..6a5a3e132319 100644
@@ -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);
 }
 
Signature · 1 line
2.45.2