drm/amdgpu: fix S0ix handling when the CONFIG_AMD_PMC=m
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Mar 2021 03:58:47 +0000 (22:58 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Mar 2021 21:23:26 +0000 (16:23 -0500)
Need to check the module variant as well.

Acked-by: Prike Liang <Prike.Liang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

index 36a741d..2e9b16f 100644 (file)
@@ -903,7 +903,7 @@ void amdgpu_acpi_fini(struct amdgpu_device *adev)
  */
 bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
 {
-#if defined(CONFIG_AMD_PMC)
+#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;