]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd: Explicitly check for GFXOFF to be enabled for s0ix
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 9 Nov 2023 17:23:46 +0000 (11:23 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 10 Nov 2023 16:08:20 +0000 (11:08 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

index d62e497586357da349c9f8ae57709cd5309783bc..e550067e5c5d19b0136ea748c98227b8e0570635 100644 (file)
@@ -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