Skip to contentSkip to conversation

drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11

PATCH In review Alex Deucher 3 participants 7 messages Aug 17, 2023 – Aug 21, 2023

Subsystems (4)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/2 drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11

From: Tim Huang <[email protected]>

For SMU v13.0.4/11, driver does not need to stop RLC for S0i3, the firmwares will handle that properly.

(cherry picked from commit 730d44e1fa306a20746ad4a85da550662aed9daa)
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -2
index ea03e8d9a3f6..818379276a58 100644
@@ -1573,9 +1573,9 @@ static int smu_disable_dpms(struct smu_context *smu)
 
 	/*
 	 * For SMU 13.0.4/11, PMFW will handle the features disablement properly
-	 * for gpu reset case. Driver involvement is unnecessary.
+	 * for gpu reset and S0i3 cases. Driver involvement is unnecessary.
 	 */
-	if (amdgpu_in_reset(adev)) {
+	if (amdgpu_in_reset(adev) || adev->in_s0ix) {
 		switch (adev->ip_versions[MP1_HWIP][0]) {
 		case IP_VERSION(13, 0, 4):
 		case IP_VERSION(13, 0, 11):
Signature · 1 line
2.41.0
author maintainer
#1 lore raw

PATCH 2/2 drm/amdgpu: keep irq count in amdgpu_irq_disable_all

From: Guchun Chen <[email protected]>

This can clean up all irq warnings because of unbalanced amdgpu_irq_get/put when unplugging/unbinding device, and leave irq count decrease in each ip fini function.

Fixes warnings on module unload.

(cherry picked from commit 8ffd6f0442674f32c048ec8dffdbc5ec67829beb)
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -1
index fafebec5b7b6..9581c020d815 100644
@@ -124,7 +124,6 @@ void amdgpu_irq_disable_all(struct amdgpu_device *adev)
 				continue;
 
 			for (k = 0; k < src->num_types; ++k) {
-				atomic_set(&src->enabled_types[k], 0);
 				r = src->funcs->set(adev, src, k,
 						    AMDGPU_IRQ_STATE_DISABLE);
 				if (r)
Signature · 1 line
2.41.0
#2 lore raw
In reply to Alex Deucher
Quoted 10 lines · Alex Deucher

From: Tim Huang <[email protected]>

For SMU v13.0.4/11, driver does not need to stop RLC for S0i3, the firmwares will handle that properly.

(cherry picked from commit 730d44e1fa306a20746ad4a85da550662aed9daa)

Greg,

Just want to make sure this one didn't get accidentally skipped since you populated the stable queues and didn't see it landed.

Thanks!

Quoted 20 lines
---
  drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -2
index ea03e8d9a3f6..818379276a58 100644
@@ -1573,9 +1573,9 @@ static int smu_disable_dpms(struct smu_context *smu)
 
  	/*
  	 * For SMU 13.0.4/11, PMFW will handle the features disablement properly
-	 * for gpu reset case. Driver involvement is unnecessary.
+	 * for gpu reset and S0i3 cases. Driver involvement is unnecessary.
  	 */
-	if (amdgpu_in_reset(adev)) {
+	if (amdgpu_in_reset(adev) || adev->in_s0ix) {
  		switch (adev->ip_versions[MP1_HWIP][0]) {
  		case IP_VERSION(13, 0, 4):
  		case IP_VERSION(13, 0, 11):
maintainer
#3 lore raw
Quoted 14 lines · Mario
Quoted 10 lines · Alex Deucher

From: Tim Huang <[email protected]>

For SMU v13.0.4/11, driver does not need to stop RLC for S0i3, the firmwares will handle that properly.

(cherry picked from commit 730d44e1fa306a20746ad4a85da550662aed9daa)
Quoted 4 lines

Greg,

Just want to make sure this one didn't get accidentally skipped since you populated the stable queues and didn't see it landed.

I'm still working on catching up on the stable backlog as I was gone last week, this is in my "to get to soon" queue, it's not lost :)

thanks,

greg k-h

maintainer
#4 lore raw
Quoted 15 lines · Greg KH
Quoted 14 lines · Mario
Quoted 10 lines · Alex Deucher

From: Tim Huang <[email protected]>

For SMU v13.0.4/11, driver does not need to stop RLC for S0i3, the firmwares will handle that properly.

(cherry picked from commit 730d44e1fa306a20746ad4a85da550662aed9daa)
Quoted 7 lines
Quoted 4 lines

Greg,

Just want to make sure this one didn't get accidentally skipped since you populated the stable queues and didn't see it landed.

I'm still working on catching up on the stable backlog as I was gone last week, this is in my "to get to soon" queue, it's not lost :)

Wait, I'm confused. You have 2 patches in this series, yet one says "6.1.x" and one "6.4.x"? But both actually to both trees. So where are these supposed to be applied to?

Please always give me a hint, and never mix/match kernel versions in a patch series, what would you do if you recieved that?

thanks,

greg k-h

#5 lore raw
Quoted 28 lines · Greg KH
Quoted 15 lines · Greg KH
Quoted 14 lines · Mario
Quoted 10 lines · Alex Deucher

From: Tim Huang <[email protected]>

For SMU v13.0.4/11, driver does not need to stop RLC for S0i3, the firmwares will handle that properly.

(cherry picked from commit 730d44e1fa306a20746ad4a85da550662aed9daa)
Quoted 7 lines
Quoted 4 lines

Greg,

Just want to make sure this one didn't get accidentally skipped since you populated the stable queues and didn't see it landed.

I'm still working on catching up on the stable backlog as I was gone last week, this is in my "to get to soon" queue, it's not lost :)

Wait, I'm confused. You have 2 patches in this series, yet one says "6.1.x" and one "6.4.x"? But both actually to both trees. So where are these supposed to be applied to?

Quoted 6 lines

Please always give me a hint, and never mix/match kernel versions in a patch series, what would you do if you recieved that?

thanks,

greg k-h

Yeah I see the confusion here. Sorry about that.
I looked over both and they should both apply to 6.1.y and 6.4.y.

Thanks!

maintainer
#6 lore raw
Quoted 34 lines · Mario
Quoted 31 lines · Greg KH
Quoted 15 lines · Greg KH
Quoted 14 lines · Mario
Quoted 10 lines · Alex Deucher

From: Tim Huang <[email protected]>

For SMU v13.0.4/11, driver does not need to stop RLC for S0i3, the firmwares will handle that properly.

(cherry picked from commit 730d44e1fa306a20746ad4a85da550662aed9daa)
Quoted 7 lines
Quoted 4 lines

Greg,

Just want to make sure this one didn't get accidentally skipped since you populated the stable queues and didn't see it landed.

I'm still working on catching up on the stable backlog as I was gone last week, this is in my "to get to soon" queue, it's not lost :)

Wait, I'm confused. You have 2 patches in this series, yet one says "6.1.x" and one "6.4.x"? But both actually to both trees. So where are these supposed to be applied to?

Please always give me a hint, and never mix/match kernel versions in a patch series, what would you do if you recieved that?

Quoted 6 lines
Quoted 3 lines

thanks,

greg k-h

Yeah I see the confusion here. Sorry about that.
I looked over both and they should both apply to 6.1.y and 6.4.y.

Thanks, both now queued up to both trees.

greg k-h