Skip to contentSkip to conversation

drm/amdgpu: No need to check gfxoff status after enable gfxoff feature

PATCH In review chen gong 3 participants 3 messages Oct 14, 2019 – Oct 15, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

chen gong

author
#0 lore raw

PATCH 1/1 drm/amdgpu: No need to check gfxoff status after enable gfxoff feature

smu_send_smc_msg(smu, SMU_MSG_AllowGfxOff) Just turn on a switch.

As to when GPU get into "GFXoff" will be up to drawing load.

So we can not sure which state GPU should be in after enable gfxoff feature.

---
 drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v12_0.c +0 -9
index c9691d0..cac4269 100644
@@ -244,15 +244,6 @@ static int smu_v12_0_gfx_off_control(struct smu_context *smu, bool enable)
 	if (enable) {
 		ret = smu_send_smc_msg(smu, SMU_MSG_AllowGfxOff);
 
-		/* confirm gfx is back to "off" state, timeout is 5 seconds */
-		while (!(smu_v12_0_get_gfxoff_status(smu) == 0)) {
-			msleep(10);
-			timeout--;
-			if (timeout == 0) {
-				DRM_ERROR("enable gfxoff timeout and failed!\n");
-				break;
-			}
-		}
 	} else {
 		ret = smu_send_smc_msg(smu, SMU_MSG_DisallowGfxOff);
 
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): 1571021854-25722-1-git-send-email-curry.gong-5C7GfCeVMHo@public.gmane.org

Acked-by Evan Quan
#2 lore raw

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of chen gong
Sent: Monday, October 14, 2019 10:58 AM
To: [email protected]
Cc: Gong, Curry <[email protected]>
Subject: [PATCH] drm/amdgpu: No need to check gfxoff status after enable gfxoff feature

smu_send_smc_msg(smu, SMU_MSG_AllowGfxOff) Just turn on a switch.

As to when GPU get into "GFXoff" will be up to drawing load.

So we can not sure which state GPU should be in after enable gfxoff feature.

---
 drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v12_0.c +0 -9
index c9691d0..cac4269 100644
@@ -244,15 +244,6 @@ static int smu_v12_0_gfx_off_control(struct smu_context *smu, bool enable)
 	if (enable) {
 		ret = smu_send_smc_msg(smu, SMU_MSG_AllowGfxOff);
 
-		/* confirm gfx is back to "off" state, timeout is 5 seconds */
-		while (!(smu_v12_0_get_gfxoff_status(smu) == 0)) {
-			msleep(10);
-			timeout--;
-			if (timeout == 0) {
-				DRM_ERROR("enable gfxoff timeout and failed!\n");
-				break;
-			}
-		}
 	} else {
 		ret = smu_send_smc_msg(smu, SMU_MSG_DisallowGfxOff);
 

--
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

Reviewed-by
#3 lore raw
In reply to a message not in the archive

comment inline.
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of chen gong <[email protected]>
Sent: Monday, October 14, 2019 10:57 AM
To: [email protected] <[email protected]>
Cc: Gong, Curry <[email protected]>
Subject: [PATCH] drm/amdgpu: No need to check gfxoff status after enable gfxoff feature

smu_send_smc_msg(smu, SMU_MSG_AllowGfxOff) Just turn on a switch.

As to when GPU get into "GFXoff" will be up to drawing load.

So we can not sure which state GPU should be in after enable gfxoff feature.

---
 drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v12_0.c +0 -4
index c9691d0..cac4269 100644
@@ -244,15 +244,6 @@ static int smu_v12_0_gfx_off_control(struct smu_context *smu, bool enable)
         if (enable) {
                 ret = smu_send_smc_msg(smu, SMU_MSG_AllowGfxOff);
 
-               /* confirm gfx is back to "off" state, timeout is 5 seconds */
-               while (!(smu_v12_0_get_gfxoff_status(smu) == 0)) {
-                       msleep(10);
-                       timeout--;

[kevin]:
the varible of "timeout" is not used after this patch, please remove it together. after fixed.

- if (timeout == 0) {
- DRM_ERROR("enable gfxoff timeout and failed!\n");
- break;
- }
- }

         } else {
                 ret = smu_send_smc_msg(smu, SMU_MSG_DisallowGfxOff);

--
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