Skip to contentSkip to conversation

drm/amdgpu/vangogh: don't check for dpm in is_dpm_running when in suspend

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

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/vangogh: don't check for dpm in is_dpm_running when in suspend

Do the same thing we do for Renoir. We can check, but since the sbios has started DPM, it will always return true which causes the driver to skip some of the SMU init when it shouldn't.

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +5 -0
index 2f502fec67d5..ed11e0ab8299 100644
@@ -384,10 +384,15 @@ static int vangogh_dpm_set_jpeg_enable(struct smu_context *smu, bool enable)
 
 static bool vangogh_is_dpm_running(struct smu_context *smu)
 {
+	struct amdgpu_device *adev = smu->adev;
 	int ret = 0;
 	uint32_t feature_mask[2];
 	uint64_t feature_enabled;
 
+	/* we need to re-init after suspend so return false */
+	if (adev->in_suspend)
+		return false;
+
 	ret = smu_cmn_get_enabled_32_bits_mask(smu, feature_mask, 2);
 
 	if (ret)
Signature · 6 lines
2.30.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 Public Use]

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2021/March/26, Friday 4:58 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/vangogh: don't check for dpm in is_dpm_running when in suspend

Quoted 5 lines

Do the same thing we do for Renoir. We can check, but since the sbios has started DPM, it will always return true which causes the driver to skip some of the SMU init when it shouldn't.

Quoted 28 lines
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +5 -1
index 2f502fec67d5..ed11e0ab8299 100644
@@ -384,10 +384,15 @@ static int vangogh_dpm_set_jpeg_enable(struct
 smu_context *smu, bool enable)
 
 static bool vangogh_is_dpm_running(struct smu_context *smu)  {
+struct amdgpu_device *adev = smu->adev;
 int ret = 0;
 uint32_t feature_mask[2];
 uint64_t feature_enabled;
 
+/* we need to re-init after suspend so return false */
+if (adev->in_suspend)
+return false;
+
 ret = smu_cmn_get_enabled_32_bits_mask(smu, feature_mask, 2);
 
 if (ret)
--

2.30.2

Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

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

Acked-by on v1 1/1
#2 lore raw
In reply to Alex Deucher

[AMD Public Use]

Quoted 43 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Saturday, March 27, 2021 4:58 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/vangogh: don't check for dpm in is_dpm_running when in suspend

Do the same thing we do for Renoir. We can check, but since the sbios has started DPM, it will always return true which causes the driver to skip some of the SMU init when it shouldn't.

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +5 -0
index 2f502fec67d5..ed11e0ab8299 100644
@@ -384,10 +384,15 @@ static int vangogh_dpm_set_jpeg_enable(struct
 smu_context *smu, bool enable)
 
 static bool vangogh_is_dpm_running(struct smu_context *smu)
 {
+	struct amdgpu_device *adev = smu->adev;
 	int ret = 0;
 	uint32_t feature_mask[2];
 	uint64_t feature_enabled;
 
+	/* we need to re-init after suspend so return false */
+	if (adev->in_suspend)
+		return false;
+
 	ret = smu_cmn_get_enabled_32_bits_mask(smu, feature_mask, 2);
 

if (ret)
--
2.30.2

Quoted 11 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%7Cevan.quan%40amd.com%7C43d4981ccc7545675 bfe08d8f099fac3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637 523891416957673%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAi LCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2C 8w1ValXDpaPW3jzDN%2BdNmiDK10FOxgQ20h%2FJ%2F66sc%3D&amp;reser ved=0

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