All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state
@ 2020-07-06 19:16 Alex Deucher
  2020-07-07  1:31 ` Quan, Evan
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2020-07-06 19:16 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state
  2020-07-06 19:16 [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state Alex Deucher
@ 2020-07-07  1:31 ` Quan, Evan
  2020-07-07 14:34   ` Deucher, Alexander
  0 siblings, 1 reply; 3+ messages in thread
From: Quan, Evan @ 2020-07-07  1:31 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx; +Cc: Deucher, Alexander

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state
  2020-07-07  1:31 ` Quan, Evan
@ 2020-07-07 14:34   ` Deucher, Alexander
  0 siblings, 0 replies; 3+ messages in thread
From: Deucher, Alexander @ 2020-07-07 14:34 UTC (permalink / raw)
  To: Quan, Evan, Alex Deucher, amd-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2167 bytes --]

[AMD Public Use]

Ah, yes, indeed.

Thanks,

Alex
________________________________
From: Quan, Evan <Evan.Quan@amd.com>
Sent: Monday, July 6, 2020 9:31 PM
To: Alex Deucher <alexdeucher@gmail.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
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 <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Tuesday, July 7, 2020 3:16 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@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@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@lists.freedesktop.org
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

[-- Attachment #1.2: Type: text/html, Size: 4198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-07 14:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 19:16 [PATCH] drm/amdgpu/swSMU: drop pm_enabled check in set mp1 state Alex Deucher
2020-07-07  1:31 ` Quan, Evan
2020-07-07 14:34   ` Deucher, Alexander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.