Skip to contentSkip to conversation

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

PATCH In review Alex Deucher 3 participants 3 messages Feb 26, 2021 – Mar 1, 2021

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +2 -1
index 8155c54392c8..36a741d63ddc 100644
@@ -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;
 }
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Quoted 37 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Saturday, February 27, 2021 6:28 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +2 -2
index 8155c54392c8..36a741d63ddc 100644
@@ -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

Quoted 11 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f
reedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=04%7C01%7CPrike.Liang%40amd.com%7Cfe79a895d34a4d25 47cc08d8daa5d4d8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7 C637499753082442990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sd ata=LKHdOptexAF4NF%2F7nhMyjvh7rGcQN%2FnpTQS7yKT%2FAPM%3D&am p;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Deucher
Quoted 31 lines · Alex Deucher

[CAUTION: External Email]

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.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +2 -2
index 8155c54392c8..36a741d63ddc 100644
@@ -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

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Crajneesh.bhardwaj%40amd.com%7Cb87b540fd0f94816b82008d8daa5d54a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637499753077416653%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=BAGVzTXPSiYXg7VgC0LeNinwMwDlcGJ%2BehuPffi6k4w%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx