Skip to contentSkip to conversation

drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state

PATCH In review Alex Deucher 3 participants 3 messages Jul 6, 2020 – Jul 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state

We need to set the mp1 state in PCI shutdown and certain reset cases which happens after we've already suspended the SMU. SMU suspend sets pm_enabled to false which prevents this code from being run.

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +0 -3
index fe4948aa662f..0ed75a9897eb 100644
@@ -1924,9 +1924,6 @@ int smu_set_mp1_state(struct smu_context *smu,
 	uint16_t msg;
 	int ret;
 
-	if (!smu->pm_enabled)
-		return -EOPNOTSUPP;
-
 	mutex_lock(&smu->mutex);
 
 	switch (mp1_state) {
Signature · 6 lines
2.25.4

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

[AMD Official Use Only - Internal Distribution Only]

I think you may wrongly treated the "pm_enabled" as "dpm_enabled". pm_enabled should be always true unless user specifies "dpm=0" on module loading.

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, July 7, 2020 3:16 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state

We need to set the mp1 state in PCI shutdown and certain reset cases which happens after we've already suspended the SMU. SMU suspend sets pm_enabled to false which prevents this code from being run.

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +0 -3
index fe4948aa662f..0ed75a9897eb 100644
@@ -1924,9 +1924,6 @@ int smu_set_mp1_state(struct smu_context *smu,
 uint16_t msg;
 int ret;
 
-if (!smu->pm_enabled)
-return -EOPNOTSUPP;
-
 mutex_lock(&smu->mutex);
 
 switch (mp1_state) {

--
2.25.4

_______________________________________________
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%7Cevan.quan%40amd.com%7C833334723b854666ac1f08d821e11cf8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637296598083021484&amp;sdata=bD1UlSdYqXuPoDoTCvGZHRJr2F6DoJu2LHN6v5p4%2FoA%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw

[AMD Public Use]

Ah, yes, indeed.

Thanks,

Alex
________________________________
From: Quan, Evan <[email protected]>
Sent: Monday, July 6, 2020 9:31 PM
To: Alex Deucher <[email protected]>; [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state

[AMD Official Use Only - Internal Distribution Only]

I think you may wrongly treated the "pm_enabled" as "dpm_enabled". pm_enabled should be always true unless user specifies "dpm=0" on module loading.

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, July 7, 2020 3:16 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state

We need to set the mp1 state in PCI shutdown and certain reset cases which happens after we've already suspended the SMU. SMU suspend sets pm_enabled to false which prevents this code from being run.

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +0 -3
index fe4948aa662f..0ed75a9897eb 100644
@@ -1924,9 +1924,6 @@ int smu_set_mp1_state(struct smu_context *smu,
 uint16_t msg;
 int ret;
 
-if (!smu->pm_enabled)
-return -EOPNOTSUPP;
-
 mutex_lock(&smu->mutex);
 
 switch (mp1_state) {

--
2.25.4

_______________________________________________
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%7Cevan.quan%40amd.com%7C833334723b854666ac1f08d821e11cf8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637296598083021484&amp;sdata=bD1UlSdYqXuPoDoTCvGZHRJr2F6DoJu2LHN6v5p4%2FoA%3D&amp;reserved=0

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