From: Alex Deucher Date: Mon, 29 Mar 2021 17:37:57 +0000 (-0400) Subject: drm/amdgpu: check whether s2idle is enabled to determine s0ix X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ad445f312e8b807c163cc1c0fb4862dc1f143ceb;p=users%2Fjedix%2Flinux-maple.git drm/amdgpu: check whether s2idle is enabled to determine s0ix 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 --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index bf2939b6eb430..6cf6231057fc0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -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;