From: Mario Limonciello Date: Wed, 29 Dec 2021 19:56:09 +0000 (-0600) Subject: drm/amdgpu: don't set s3 and s0ix at the same time X-Git-Tag: v5.15.73~4432 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=060102fbd92d2d514c4a4da71d555cf9b7d65faa;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: don't set s3 and s0ix at the same time commit eac4c54bf7f17fb4681b85e5fe383b74d6261a2b upstream. This makes it clearer which codepaths are in use specifically in one state or the other. Signed-off-by: Mario Limonciello Acked-by: Evan Quan Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index b517b76..6babed3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2250,9 +2250,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) @@ -2269,6 +2269,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; }