Skip to content

Commit

Permalink
drm/amd/powerplay: correct power reading on fiji
Browse files Browse the repository at this point in the history
Set sampling period as 500ms to provide a smooth power
reading output. Also, correct the register for power
reading.

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Feifei Xu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
  • Loading branch information
Evan Quan authored and alexdeucher committed Mar 11, 2019
1 parent 8f2bf88 commit f5742ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3491,14 +3491,14 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query)

smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PmStatusLogStart);
cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC,
ixSMU_PM_STATUS_94, 0);
ixSMU_PM_STATUS_95, 0);

for (i = 0; i < 10; i++) {
mdelay(1);
mdelay(500);
smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PmStatusLogSample);
tmp = cgs_read_ind_register(hwmgr->device,
CGS_IND_REG__SMC,
ixSMU_PM_STATUS_94);
ixSMU_PM_STATUS_95);
if (tmp != 0)
break;
}
Expand Down

0 comments on commit f5742ec

Please sign in to comment.