Skip to contentSkip to conversation

drm/amd/powerplay: avoid deadlock on Vega20 swSMU routine

PATCH In review Evan Quan 2 participants 2 messages Dec 30, 2019

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: avoid deadlock on Vega20 swSMU routine

The lock required was already hold by its parent API.

Change-Id I2ffe63d2016a2e274d54634cd8f8c51cca8b3a1c
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +0 -4
index bd3dbd1a0ad3..4b686f0af538 100644
@@ -2279,13 +2279,9 @@ int smu_set_active_display_count(struct smu_context *smu, uint32_t count)
 {
 	int ret = 0;
 
-	mutex_lock(&smu->mutex);
-
 	if (smu->ppt_funcs->set_active_display_count)
 		ret = smu->ppt_funcs->set_active_display_count(smu, count);
 
-	mutex_unlock(&smu->mutex);
-
 	return ret;
 }
 
Signature · 6 lines
2.24.0

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

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Monday, December 30, 2019 6:40 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/powerplay: avoid deadlock on Vega20 swSMU routine

The lock required was already hold by its parent API.

Change-Id I2ffe63d2016a2e274d54634cd8f8c51cca8b3a1c
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +0 -5
index bd3dbd1a0ad3..4b686f0af538 100644
@@ -2279,13 +2279,9 @@ int smu_set_active_display_count(struct smu_context *smu, uint32_t count)  {
 	int ret = 0;
 
-	mutex_lock(&smu->mutex);
-
 	if (smu->ppt_funcs->set_active_display_count)
 		ret = smu->ppt_funcs->set_active_display_count(smu, count);
 
-	mutex_unlock(&smu->mutex);
-
 	return ret;
 }
 
--

2.24.0

_______________________________________________
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=02%7C01%7CFeifei.Xu%40amd.com%7C0c69774261644dbf915708d78d14b8af%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637132992460232130&amp;sdata=VE1izoxhGZuGqIIKmYW2a3eu8eYPogoC3LsP0C%2BRbjY%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx