diff options
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c index 344806521468..5bac36baa13c 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | |||
@@ -1494,8 +1494,9 @@ cz_print_current_perforce_level(struct pp_hwmgr *hwmgr, struct seq_file *m) | |||
1494 | uint32_t vce_index = PHM_GET_FIELD(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixTARGET_AND_CURRENT_PROFILE_INDEX_2), | 1494 | uint32_t vce_index = PHM_GET_FIELD(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixTARGET_AND_CURRENT_PROFILE_INDEX_2), |
1495 | TARGET_AND_CURRENT_PROFILE_INDEX_2, CURR_VCE_INDEX); | 1495 | TARGET_AND_CURRENT_PROFILE_INDEX_2, CURR_VCE_INDEX); |
1496 | 1496 | ||
1497 | uint32_t sclk, vclk, dclk, ecclk, tmp; | 1497 | uint32_t sclk, vclk, dclk, ecclk, tmp, active_percent; |
1498 | uint16_t vddnb, vddgfx; | 1498 | uint16_t vddnb, vddgfx; |
1499 | int result; | ||
1499 | 1500 | ||
1500 | if (sclk_index >= NUM_SCLK_LEVELS) { | 1501 | if (sclk_index >= NUM_SCLK_LEVELS) { |
1501 | seq_printf(m, "\n invalid sclk dpm profile %d\n", sclk_index); | 1502 | seq_printf(m, "\n invalid sclk dpm profile %d\n", sclk_index); |
@@ -1532,6 +1533,16 @@ cz_print_current_perforce_level(struct pp_hwmgr *hwmgr, struct seq_file *m) | |||
1532 | seq_printf(m, "\n index: %u vce ecclk: %u MHz\n", vce_index, ecclk/100); | 1533 | seq_printf(m, "\n index: %u vce ecclk: %u MHz\n", vce_index, ecclk/100); |
1533 | } | 1534 | } |
1534 | } | 1535 | } |
1536 | |||
1537 | result = smum_send_msg_to_smc(hwmgr->smumgr, PPSMC_MSG_GetAverageGraphicsActivity); | ||
1538 | if (0 == result) { | ||
1539 | active_percent = cgs_read_register(hwmgr->device, mmSMU_MP1_SRBM2P_ARG_0); | ||
1540 | active_percent = active_percent > 100 ? 100 : active_percent; | ||
1541 | } else { | ||
1542 | active_percent = 50; | ||
1543 | } | ||
1544 | |||
1545 | seq_printf(m, "\n [GPU load]: %u %%\n\n", active_percent); | ||
1535 | } | 1546 | } |
1536 | 1547 | ||
1537 | static void cz_hw_print_display_cfg( | 1548 | static void cz_hw_print_display_cfg( |