]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: Only check for S0ix if AMD_PMC is configured
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Feb 2021 15:21:49 +0000 (10:21 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Mar 2021 03:46:55 +0000 (22:46 -0500)
The S0ix check only makes sense if the AMD PMC driver is
present.  We need to use the legacy S3 pathes when the
PMC driver is not present.

Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@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 8155c54392c885a96f93cb7bf789a266fe08bb38..36a741d63ddcf602ca408e025b7b198b43157d2a 100644 (file)
@@ -903,10 +903,11 @@ void amdgpu_acpi_fini(struct amdgpu_device *adev)
  */
 bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
 {
+#if defined(CONFIG_AMD_PMC)
        if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
                if (adev->flags & AMD_IS_APU)
                        return true;
        }
-
+#endif
        return false;
 }