summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-11-09 20:23:46 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-11-10 19:08:20 +0300
commite4c44b1a19625348fc004ce8c5f828d5d80d037e (patch)
tree08588e0688af125e7afd44c47f0ea5f8b94d321d /drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
parent197264284303b30b26e885d83680f594e69840e5 (diff)
downloadlinux-e4c44b1a19625348fc004ce8c5f828d5d80d037e.tar.xz
drm/amd: Explicitly check for GFXOFF to be enabled for s0ix
If a user has disabled GFXOFF this may cause problems for the suspend sequence. Ensure that it is enabled in amdgpu_acpi_is_s0ix_active(). The system won't reach the deepest state but it also won't hang. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index d62e49758635..e550067e5c5d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -1497,6 +1497,9 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
if (adev->asic_type < CHIP_RAVEN)
return false;
+ if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
+ return false;
+
/*
* If ACPI_FADT_LOW_POWER_S0 is not set in the FADT, it is generally
* risky to do any special firmware-related preparations for entering