From 003ac5f7ea1a9d25e6cd1425cdc62a336938a92c Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 13 May 2022 03:28:25 +0000 Subject: [PATCH] drm/amdgpu: don't set s3 and s0ix at the same time From Mario Limonciello 060102fbd92d2d514c4a4da71d555cf9b7d65faa in linux 5.15.y/5.15.39 eac4c54bf7f17fb4681b85e5fe383b74d6261a2b in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c index 9d7f33d9aea..ecb90e0c834 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c @@ -2254,9 +2254,9 @@ static int amdgpu_pmops_suspend(struct device *dev) if (amdgpu_acpi_is_s0ix_active(adev)) adev->in_s0ix = true; - adev->in_s3 = true; + else + adev->in_s3 = true; r = amdgpu_device_suspend(drm_dev, true); - adev->in_s3 = false; if (r) return r; if (!adev->in_s0ix) @@ -2273,6 +2273,8 @@ static int amdgpu_pmops_resume(struct device *dev) r = amdgpu_device_resume(drm_dev, true); if (amdgpu_acpi_is_s0ix_active(adev)) adev->in_s0ix = false; + else + adev->in_s3 = false; return r; } -- 2.20.1