author: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> 2021-07-23 18:08:40 +0530
committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-08-04 12:47:49 +0200
commit: 4e7961b3d5fd9e05a24487b2e81624f74b65a7dc
parent: 0652b1eade5311f1bd7f9961ae93aed2b660a3d1
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 2e9b16fb3fcd..355a6923849d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -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_target_state == PM_SUSPEND_TO_IDLE;
}
#endif
return false;