aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Huang <JinHuiEric.Huang@amd.com>2018-03-29 11:49:51 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-04-03 14:08:44 -0400
commit46bce67f62e7daa00ad908c4c17e9750df2acf52 (patch)
treeb89202e67a6b5de78cba5a94707b9374ba051b91
parent5d41535c5d66b0a9ad2b7d5d1a72025cbca13ed2 (diff)
drm/amd/powerply: fix power reading on Fiji
Power value is wrong reported by customer. It is a regression by commit a7c7bc4c0c47eaac77b8fa92f0672032df7f4254 Author: Rex Zhu <Rex.Zhu@amd.com> Date: Mon Mar 27 15:32:59 2017 +0800 drm/amd/powerplay: reduce sample period time for power readings. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> The theoretical sampling period is from 50ms to 4sec, original 2sec is long but correct, and 20ms is too short. change it to more reasonable 200ms. Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 2b0c366d6149..add90675fd2a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -3374,7 +3374,8 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr,
3374 "Failed to start pm status log!", 3374 "Failed to start pm status log!",
3375 return -1); 3375 return -1);
3376 3376
3377 msleep_interruptible(20); 3377 /* Sampling period from 50ms to 4sec */
3378 msleep_interruptible(200);
3378 3379
3379 PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr, 3380 PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr,
3380 PPSMC_MSG_PmStatusLogSample), 3381 PPSMC_MSG_PmStatusLogSample),