diff mbox series

[v3,08/10] drm/amd: Use `pm_suspend_default_s2idle`

Message ID 20220701023328.2783-8-mario.limonciello@amd.com
State New
Headers show
Series None | expand

Commit Message

Mario Limonciello July 1, 2022, 2:33 a.m. UTC
Rather than examining the suspend target, examine what the system is
configured to use.  This should be no functional change, just improves
readability by taking the helper instead.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 2146232c62ef..fc2c6e311979 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -1056,7 +1056,7 @@  bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev)
 {
 	if (adev->flags & AMD_IS_APU)
 		return false;
-	return pm_suspend_target_state != PM_SUSPEND_TO_IDLE;
+	return !pm_suspend_default_s2idle();
 }
 
 /**
@@ -1069,7 +1069,7 @@  bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev)
 bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
 {
 	if (!(adev->flags & AMD_IS_APU) ||
-	    (pm_suspend_target_state != PM_SUSPEND_TO_IDLE))
+	    !pm_suspend_default_s2idle())
 		return false;
 
 	if (!pm_suspend_preferred_s2idle()) {