drm/amdgpu: add judgement for suspend/resume sequence

S0ix only makes sense on APUs since they are part of the platform, so
only when the ASIC is APU should set amdgpu_acpi_is_s0ix_supported flag
to deal with the related situation.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Likun Gao
2020-12-15 11:32:20 -05:00
committed by Alex Deucher
parent a9c210c1e5
commit 9ca5b8a170
3 changed files with 10 additions and 8 deletions

View File

@@ -901,10 +901,12 @@ void amdgpu_acpi_fini(struct amdgpu_device *adev)
*
* returns true if supported, false if not.
*/
bool amdgpu_acpi_is_s0ix_supported(void)
bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
{
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)
return true;
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
if (adev->flags & AMD_IS_APU)
return true;
}
return false;
}