Skip to contentSkip to conversation

drm/amd/pm: enable LCLK DS

PATCH In review Kenneth Feng 3 participants 3 messages Feb 7, 2021 – Feb 8, 2021

Subsystems (3)
lore
Share & tools
lore

Kenneth Feng

author maintainer
#0 lore raw

PATCH v2 1/1 drm/amd/pm: enable LCLK DS

v1:
Enable LCLK deep sleep and it works if we enable ASPM:
modprobe amdgpu aspm=1

v2:
Add the amdgpu_aspm flag check

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3 -0
index b9e47f3b0231..af73e1430af5 100644
@@ -302,6 +302,9 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu,
 	if (smu->dc_controlled_by_gpio)
        *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT);
 
+	if (amdgpu_aspm == 1)
+		*(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT);
+
 	return 0;
 }
 
Signature · 6 lines
2.17.1

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

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Kenneth Feng
Sent: Sunday, February 7, 2021 11:16 AM
To: [email protected]
Cc: Feng, Kenneth <[email protected]>
Subject: [PATCH v2] drm/amd/pm: enable LCLK DS

v1:
Enable LCLK deep sleep and it works if we enable ASPM:
modprobe amdgpu aspm=1

v2:
Add the amdgpu_aspm flag check

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3 -0
index b9e47f3b0231..af73e1430af5 100644
@@ -302,6 +302,9 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu,
 if (smu->dc_controlled_by_gpio)
        *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT);
 
+if (amdgpu_aspm == 1)
+*(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT);
+
 return 0;
 }
 

--
2.17.1

_______________________________________________
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%7Cevan.quan%40amd.com%7Cefc5d77f73174dca068808d8cb16b903%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637482645750459900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=e2RbIxZdsRt7eFr2hTgtCj6lABPanAZoyI7ZnorYzks%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw
In reply to Kenneth Feng
Quoted 18 lines · Kenneth Feng

v1:
Enable LCLK deep sleep and it works if we enable ASPM:
modprobe amdgpu aspm=1

v2:
Add the amdgpu_aspm flag check

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +0 -0
index b9e47f3b0231..af73e1430af5 100644

drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu, · line 305

Quoted 4 lines
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +1 -0
@@ -302,6 +302,9 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu,
        if (smu->dc_controlled_by_gpio)
        *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT);
 
+       if (amdgpu_aspm == 1)

We should probably pull the aspm flag into adev so we can selectively enable/disable it by default on different asics.

Alex

Quoted 8 lines
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +2 -1
+               *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT);
+
        return 0;
 }
 
--

2.17.1

Quoted 4 lines

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

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