mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 06:46:35 +01:00
drm/amdgpu: Check pmops for desired suspend state
[Why] User might change the suspend behaviour from OS. [How] Check with pm for target suspend state and set s0ix flag only for s2idle state. v2: User might change default suspend state, use target state v3: squash in build fix Suggested-by: Lijo Lazar <[email protected]> Signed-off-by: Pratik Vishwakarma <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
This commit is contained in:
1 parent
6aade587d3
commit
91e273712a
1 file changed
+2
-1
@@ -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>
|
||||
|
||||
@@ -1042,7 +1043,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;
|
||||
|
||||
Reference in new issue
Block a user