Skip to contentSkip to conversation

drm/amd: Explicitly check for GFXOFF to be enabled for s0ix

PATCH In review Mario Limonciello 2 participants 2 messages Nov 9, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +3 -0
index d62e49758635..e550067e5c5d 100644
@@ -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
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

[Public]

________________________________
From: amd-gfx <[email protected]> on behalf of Mario Limonciello <[email protected]>
Sent: Thursday, November 9, 2023 11:27 AM
To: [email protected] <[email protected]>
Cc: Limonciello, Mario <[email protected]>
Subject: [PATCH] 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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +3 -0
index d62e49758635..e550067e5c5d 100644
@@ -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

--
2.34.1