Skip to contentSkip to conversation

drm/amd/powerplay: Disable gfx CGPG when suspend smu

PATCH In review chen gong 3 participants 5 messages Oct 25, 2019 – Oct 28, 2019 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

chen gong

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: Disable gfx CGPG when suspend smu

if no disable gfx CGPG when suspend smu, enabling gfx CGPG will fail when resume smu.

Platform: Renoir
dmesg log information:

[  151.844110 ] amdgpu: [powerplay] SMU is resuming...
[  151.844116 ] amdgpu: [powerplay] dpm has been disabled
[  151.844604 ] amdgpu: [powerplay] Failed to send message 0x2f,response 0xfffffffb param 0x1
[  151.844605 ] amdgpu: [powerplay] SMU is resumed successfully!
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +2 -0
index 26923aa..4e468b0 100644
@@ -1351,6 +1351,8 @@ static int smu_suspend(void *handle)
 	if (adev->asic_type >= CHIP_NAVI10 &&
 	    adev->gfx.rlc.funcs->stop)
 		adev->gfx.rlc.funcs->stop(adev);
+	if (smu->is_apu)
+		smu_set_gfx_cgpg(&adev->smu, false);
 
 	return 0;
 }
Signature · 6 lines
2.7.4

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

A message that is not in the archive (sent off-list or not yet received): 1572001610-9599-1-git-send-email-curry.gong-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Why do you disable CGPG for all APU?

Thanks,
Ray

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of chen gong
Sent: Friday, October 25, 2019 7:07 PM
To: [email protected]
Cc: Gong, Curry <[email protected]>
Subject: [PATCH] drm/amd/powerplay: Disable gfx CGPG when suspend smu

if no disable gfx CGPG when suspend smu, enabling gfx CGPG will fail when resume smu.

Platform: Renoir
dmesg log information:

[ 151.844110 ] amdgpu: [powerplay] SMU is resuming...
[ 151.844116 ] amdgpu: [powerplay] dpm has been disabled [ 151.844604 ] amdgpu: [powerplay] Failed to send message 0x2f,response 0xfffffffb param 0x1 [ 151.844605 ] amdgpu: [powerplay] SMU is resumed successfully!

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +2 -0
index 26923aa..4e468b0 100644
@@ -1351,6 +1351,8 @@ static int smu_suspend(void *handle)
 	if (adev->asic_type >= CHIP_NAVI10 &&
 	    adev->gfx.rlc.funcs->stop)
 		adev->gfx.rlc.funcs->stop(adev);
+	if (smu->is_apu)
+		smu_set_gfx_cgpg(&adev->smu, false);
 
 	return 0;
 }

--
2.7.4

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

A message that is not in the archive (sent off-list or not yet received): MN2PR12MB3309AD7F0E9B0911A7AC9C5CEC650-rweVpJHSKTpWdvXm18W95QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author Reviewed-by Huang Rui
#4 lore raw

Hi Ray:

Because I found that enable CGPG for all APU in smu_resume at 0d2e9b10428a6

commit 0d2e9b10428a6c261c99f2d982be7745f35eef97

Author: Prike Liang <[email protected]>
Date:   Tue Oct 15 17:11:49 2019 +0800

drm/amdgpu: fix S3 failed as RLC safe mode entry stucked in polloing gfx acq

Fix gfx cgpg setting sequence for RLC deadlock at safe mode entry in polling gfx response. The patch can fix VCN IB test failed and DAL get dispaly count failed issue.

drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +3 -0
index acec69b74734..e2a03f411d6b 100644
@@ -1350,6 +1351,9 @@ static int smu_resume(void *handle)
        if (ret)
                goto failed;
 
+       if (smu->is_apu)
+               smu_set_gfx_cgpg(&adev->smu, true);
+
        mutex_unlock(&smu->mutex);
 
        pr_info("SMU is resumed successfully!\n");

-----Original Message-----
From: Huang, Ray <[email protected]>
Sent: Friday, October 25, 2019 9:26 PM
To: Gong, Curry <[email protected]>; [email protected]
Cc: Gong, Curry <[email protected]>
Subject: RE: [PATCH] drm/amd/powerplay: Disable gfx CGPG when suspend smu

Why do you disable CGPG for all APU?

Thanks,
Ray

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of chen gong
Sent: Friday, October 25, 2019 7:07 PM
To: [email protected]
Cc: Gong, Curry <[email protected]>
Subject: [PATCH] drm/amd/powerplay: Disable gfx CGPG when suspend smu

if no disable gfx CGPG when suspend smu, enabling gfx CGPG will fail when resume smu.

Platform: Renoir
dmesg log information:

[ 151.844110 ] amdgpu: [powerplay] SMU is resuming...
[ 151.844116 ] amdgpu: [powerplay] dpm has been disabled [ 151.844604 ] amdgpu: [powerplay] Failed to send message 0x2f,response 0xfffffffb param 0x1 [ 151.844605 ] amdgpu: [powerplay] SMU is resumed successfully!

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +2 -0
index 26923aa..4e468b0 100644
@@ -1351,6 +1351,8 @@ static int smu_suspend(void *handle)
 	if (adev->asic_type >= CHIP_NAVI10 &&
 	    adev->gfx.rlc.funcs->stop)
 		adev->gfx.rlc.funcs->stop(adev);
+	if (smu->is_apu)
+		smu_set_gfx_cgpg(&adev->smu, false);
 
 	return 0;
 }

--
2.7.4

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

A message that is not in the archive (sent off-list or not yet received): MN2PR12MB3069CB862732575D4F9835BF9D660-rweVpJHSKTpIs82n4wpHmwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#6 lore raw
Quoted 3 lines · Curry

Hi Ray:

Because I found that enable CGPG for all APU in smu_resume at 0d2e9b10428a6

I see, thanks.

Patch is Reviewed-by: Huang Rui <[email protected]>

Quoted 77 lines

commit 0d2e9b10428a6c261c99f2d982be7745f35eef97

Author: Prike Liang <[email protected]>
Date:   Tue Oct 15 17:11:49 2019 +0800

drm/amdgpu: fix S3 failed as RLC safe mode entry stucked in polloing gfx acq

Fix gfx cgpg setting sequence for RLC deadlock at safe mode entry in polling gfx response. The patch can fix VCN IB test failed and DAL get dispaly count failed issue.

drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +3 -1
index acec69b74734..e2a03f411d6b 100644
@@ -1350,6 +1351,9 @@ static int smu_resume(void *handle)
        if (ret)
                goto failed;
 
+       if (smu->is_apu)
+               smu_set_gfx_cgpg(&adev->smu, true);
+
        mutex_unlock(&smu->mutex);
 
        pr_info("SMU is resumed successfully!\n");
 
-----Original Message-----

From: Huang, Ray <[email protected]>
Sent: Friday, October 25, 2019 9:26 PM
To: Gong, Curry <[email protected]>; [email protected]
Cc: Gong, Curry <[email protected]>
Subject: RE: [PATCH] drm/amd/powerplay: Disable gfx CGPG when suspend smu

Why do you disable CGPG for all APU?

Thanks,
Ray

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of chen gong
Sent: Friday, October 25, 2019 7:07 PM
To: [email protected]
Cc: Gong, Curry <[email protected]>
Subject: [PATCH] drm/amd/powerplay: Disable gfx CGPG when suspend smu

if no disable gfx CGPG when suspend smu, enabling gfx CGPG will fail when resume smu.

Platform: Renoir
dmesg log information:

[ 151.844110 ] amdgpu: [powerplay] SMU is resuming...
[ 151.844116 ] amdgpu: [powerplay] dpm has been disabled [ 151.844604 ] amdgpu: [powerplay] Failed to send message 0x2f,response 0xfffffffb param 0x1 [ 151.844605 ] amdgpu: [powerplay] SMU is resumed successfully!

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +2 -1
index 26923aa..4e468b0 100644
@@ -1351,6 +1351,8 @@ static int smu_suspend(void *handle)
 	if (adev->asic_type >= CHIP_NAVI10 &&
 	    adev->gfx.rlc.funcs->stop)
 		adev->gfx.rlc.funcs->stop(adev);
+	if (smu->is_apu)
+		smu_set_gfx_cgpg(&adev->smu, false);
 
 	return 0;
 }
--

2.7.4

Quoted 4 lines

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

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

Acked-by Evan Quan
#7 lore raw
In reply to a message not in the archive

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of chen gong
Sent: Friday, October 25, 2019 7:07 PM
To: [email protected]
Cc: Gong, Curry <[email protected]>
Subject: [PATCH] drm/amd/powerplay: Disable gfx CGPG when suspend smu

if no disable gfx CGPG when suspend smu, enabling gfx CGPG will fail when resume smu.

Platform: Renoir
dmesg log information:

[  151.844110 ] amdgpu: [powerplay] SMU is resuming...
[  151.844116 ] amdgpu: [powerplay] dpm has been disabled
[  151.844604 ] amdgpu: [powerplay] Failed to send message 0x2f,response 0xfffffffb param 0x1
[  151.844605 ] amdgpu: [powerplay] SMU is resumed successfully!
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +2 -0
index 26923aa..4e468b0 100644
@@ -1351,6 +1351,8 @@ static int smu_suspend(void *handle)
 	if (adev->asic_type >= CHIP_NAVI10 &&
 	    adev->gfx.rlc.funcs->stop)
 		adev->gfx.rlc.funcs->stop(adev);
+	if (smu->is_apu)
+		smu_set_gfx_cgpg(&adev->smu, false);
 
 	return 0;
 }
Signature · 10 lines
2.7.4

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