[PATCH] drm/amdgpu: Only check for S0ix if AMD_PMC is configured

Liang, Prike Prike.Liang at amd.com
Mon Mar 1 01:42:21 UTC 2021


[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Prike Liang <Prike.Liang at amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Saturday, February 27, 2021 6:28 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
> Subject: [PATCH] drm/amdgpu: Only check for S0ix if AMD_PMC is configured
>
> 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.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 8155c54392c8..36a741d63ddc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -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;
>  }
> --
> 2.29.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f
> reedesktop.org%2Fmailman%2Flistinfo%2Famd-
> gfx&data=04%7C01%7CPrike.Liang%40amd.com%7Cfe79a895d34a4d25
> 47cc08d8daa5d4d8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7
> C637499753082442990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sd
> ata=LKHdOptexAF4NF%2F7nhMyjvh7rGcQN%2FnpTQS7yKT%2FAPM%3D&am
> p;reserved=0


More information about the amd-gfx mailing list