Re: [PATCH] drm/amdgpu: No need to check gfxoff status after enable gfxoff feature

2019-10-15 Thread Wang, Kevin(Yang)
comment inline.

From: amd-gfx  on behalf of chen gong 

Sent: Monday, October 14, 2019 10:57 AM
To: amd-gfx@lists.freedesktop.org 
Cc: Gong, Curry 
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.

Signed-off-by: chen gong 
---
 drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c 
b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
index c9691d0..cac4269 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
@@ -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.
Reviewed-by: Kevin Wang 

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

RE: [PATCH] drm/amdgpu: No need to check gfxoff status after enable gfxoff feature

2019-10-14 Thread Quan, Evan
Acked-by: Evan Quan 

-Original Message-
From: amd-gfx  On Behalf Of chen gong
Sent: Monday, October 14, 2019 10:58 AM
To: amd-gfx@lists.freedesktop.org
Cc: Gong, Curry 
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.

Signed-off-by: chen gong 
---
 drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c 
b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
index c9691d0..cac4269 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
@@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx