]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amdgpu: check whether s2idle is enabled to determine s0ix
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Mar 2021 17:37:57 +0000 (13:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Apr 2021 03:36:06 +0000 (23:36 -0400)
For legacy S3, we need to use different handling in the driver.
Suggested by Heiko Przybyl.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1553
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

index bf2939b6eb430eb0ce7bce72b556ab829c64e810..6cf6231057fc02551636b20f0f0a8d9a727ebc90 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/slab.h>
 #include <linux/power_supply.h>
 #include <linux/pm_runtime.h>
+#include <linux/suspend.h>
 #include <acpi/video.h>
 #include <acpi/actbl.h>
 
@@ -906,7 +907,7 @@ bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
 #if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE)
        if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
                if (adev->flags & AMD_IS_APU)
-                       return true;
+                       return pm_suspend_default_s2idle();
        }
 #endif
        return false;