Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/pp: Add memory clock info display on Cz/St

show mclk info as in MHz on Cz/St as
0: 333Mhz *
1: 800Mhz

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>

authored by

Rex Zhu and committed by
Alex Deucher
039fdc94 5a4633c4

+13
+13
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
··· 1582 1582 static int cz_print_clock_levels(struct pp_hwmgr *hwmgr, 1583 1583 enum pp_clock_type type, char *buf) 1584 1584 { 1585 + struct cz_hwmgr *data = (struct cz_hwmgr *)(hwmgr->backend); 1585 1586 struct phm_clock_voltage_dependency_table *sclk_table = 1586 1587 hwmgr->dyn_state.vddc_dependency_on_sclk; 1587 1588 int i, now, size = 0; ··· 1599 1598 size += sprintf(buf + size, "%d: %uMhz %s\n", 1600 1599 i, sclk_table->entries[i].clk / 100, 1601 1600 (i == now) ? "*" : ""); 1601 + break; 1602 + case PP_MCLK: 1603 + now = PHM_GET_FIELD(cgs_read_ind_register(hwmgr->device, 1604 + CGS_IND_REG__SMC, 1605 + ixTARGET_AND_CURRENT_PROFILE_INDEX), 1606 + TARGET_AND_CURRENT_PROFILE_INDEX, 1607 + CURR_MCLK_INDEX); 1608 + 1609 + for (i = CZ_NUM_NBPMEMORYCLOCK; i > 0; i--) 1610 + size += sprintf(buf + size, "%d: %uMhz %s\n", 1611 + CZ_NUM_NBPMEMORYCLOCK-i, data->sys_info.nbp_memory_clock[i-1] / 100, 1612 + (CZ_NUM_NBPMEMORYCLOCK-i == now) ? "*" : ""); 1602 1613 break; 1603 1614 default: 1604 1615 break;