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

Quan, Evan Evan.Quan at amd.com
Tue Jul 7 01:31:59 UTC 2020


[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 <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Tuesday, July 7, 2020 3:16 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
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.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index fe4948aa662f..0ed75a9897eb 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -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
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cevan.quan%40amd.com%7C833334723b854666ac1f08d821e11cf8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637296598083021484&sdata=bD1UlSdYqXuPoDoTCvGZHRJr2F6DoJu2LHN6v5p4%2FoA%3D&reserved=0


More information about the amd-gfx mailing list