/linux/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/ |
H A D | dcn315_clk_mgr.c | 482 const DpmClocks_315_t *clock_table) in dcn315_clk_mgr_helper_populate_bw_params() argument 486 uint32_t max_pstate = clock_table->NumDfPstatesEnabled - 1; in dcn315_clk_mgr_helper_populate_bw_params() 490 for (i = 0; i < clock_table->NumDcfClkLevelsEnabled; i++) { in dcn315_clk_mgr_helper_populate_bw_params() 494 for (j = clock_table->NumDfPstatesEnabled - 2; j >= 0; j--) { in dcn315_clk_mgr_helper_populate_bw_params() 495 if (clock_table->DfPstateTable[j].Voltage <= clock_table->SocVoltage[i]) in dcn315_clk_mgr_helper_populate_bw_params() 499 if (i == clock_table->NumDcfClkLevelsEnabled - 1) in dcn315_clk_mgr_helper_populate_bw_params() 504 if (bw_params->clk_table.entries[j].dcfclk_mhz <= clock_table->DcfClocks[i]) in dcn315_clk_mgr_helper_populate_bw_params() 511 bw_params->clk_table.entries[i].fclk_mhz = clock_table->DfPstateTable[max_pstate].FClk; in dcn315_clk_mgr_helper_populate_bw_params() 512 bw_params->clk_table.entries[i].memclk_mhz = clock_table->DfPstateTable[max_pstate].MemClk; in dcn315_clk_mgr_helper_populate_bw_params() 513 bw_params->clk_table.entries[i].voltage = clock_table->SocVoltage[i]; in dcn315_clk_mgr_helper_populate_bw_params() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/ |
H A D | dcn316_clk_mgr.c | 455 const DpmClocks_316_t *clock_table, in find_clk_for_voltage() argument 464 if (clock_table->SocVoltage[i] == voltage) { in find_clk_for_voltage() 466 } else if (clock_table->SocVoltage[i] >= max_voltage && in find_clk_for_voltage() 467 clock_table->SocVoltage[i] < voltage) { in find_clk_for_voltage() 468 max_voltage = clock_table->SocVoltage[i]; in find_clk_for_voltage() 480 const DpmClocks_316_t *clock_table) in dcn316_clk_mgr_helper_populate_bw_params() argument 494 if (clock_table->DfPstateTable[i].FClk != 0) { in dcn316_clk_mgr_helper_populate_bw_params() 509 if (clock_table->NumDispClkLevelsEnabled <= NUM_DISPCLK_DPM_LEVELS && in dcn316_clk_mgr_helper_populate_bw_params() 510 clock_table->NumDispClkLevelsEnabled <= NUM_DPPCLK_DPM_LEVELS) { in dcn316_clk_mgr_helper_populate_bw_params() 511 max_dispclk = find_max_clk_value(clock_table->DispClocks, clock_table->NumDispClkLevelsEnabled); in dcn316_clk_mgr_helper_populate_bw_params() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/ |
H A D | dcn35_clk_mgr.c | 800 DpmClocks_t_dcn35 *clock_table) in dcn35_clk_mgr_helper_populate_bw_params() argument 810 num_memps = (clock_table->NumMemPstatesEnabled > NUM_MEM_PSTATE_LEVELS) ? NUM_MEM_PSTATE_LEVELS : in dcn35_clk_mgr_helper_populate_bw_params() 811 clock_table->NumMemPstatesEnabled; in dcn35_clk_mgr_helper_populate_bw_params() 813 uint32_t dram_speed_mts = calc_dram_speed_mts(&clock_table->MemPstateTable[i]); in dcn35_clk_mgr_helper_populate_bw_params() 825 uint32_t dram_speed_mts = calc_dram_speed_mts(&clock_table->MemPstateTable[i]); in dcn35_clk_mgr_helper_populate_bw_params() 834 ASSERT(clock_table->NumMemPstatesEnabled && in dcn35_clk_mgr_helper_populate_bw_params() 839 if (clock_table->NumDispClkLevelsEnabled <= NUM_DISPCLK_DPM_LEVELS && in dcn35_clk_mgr_helper_populate_bw_params() 840 clock_table->NumDispClkLevelsEnabled <= NUM_DPPCLK_DPM_LEVELS) { in dcn35_clk_mgr_helper_populate_bw_params() 841 max_dispclk = find_max_clk_value(clock_table->DispClocks, in dcn35_clk_mgr_helper_populate_bw_params() 842 clock_table->NumDispClkLevelsEnabled); in dcn35_clk_mgr_helper_populate_bw_params() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/ |
H A D | rn_clk_mgr.c | 614 static unsigned int find_socclk_for_voltage(struct dpm_clocks *clock_table, unsigned int voltage) in find_socclk_for_voltage() argument 619 if (clock_table->SocClocks[i].Vol == voltage) in find_socclk_for_voltage() 620 return clock_table->SocClocks[i].Freq; in find_socclk_for_voltage() 627 static unsigned int find_dcfclk_for_voltage(struct dpm_clocks *clock_table, unsigned int voltage) in find_dcfclk_for_voltage() argument 632 if (clock_table->DcfClocks[i].Vol == voltage) in find_dcfclk_for_voltage() 633 return clock_table->DcfClocks[i].Freq; in find_dcfclk_for_voltage() 640 …populate_bw_params(struct clk_bw_params *bw_params, struct dpm_clocks *clock_table, struct integra… in rn_clk_mgr_helper_populate_bw_params() argument 652 if (clock_table->FClocks[i].Freq != 0 && clock_table->FClocks[i].Vol != 0) { in rn_clk_mgr_helper_populate_bw_params() 667 bw_params->clk_table.entries[i].fclk_mhz = clock_table->FClocks[j].Freq; in rn_clk_mgr_helper_populate_bw_params() 668 bw_params->clk_table.entries[i].memclk_mhz = clock_table->MemClocks[j].Freq; in rn_clk_mgr_helper_populate_bw_params() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/ |
H A D | vg_clk_mgr.c | 543 static unsigned int find_dcfclk_for_voltage(const struct vg_dpm_clocks *clock_table, in find_dcfclk_for_voltage() argument 551 if (clock_table->SocVoltage[i] == voltage) in find_dcfclk_for_voltage() 552 return clock_table->DcfClocks[i]; in find_dcfclk_for_voltage() 562 const struct vg_dpm_clocks *clock_table) in vg_clk_mgr_helper_populate_bw_params() argument 575 if (clock_table->DfPstateTable[i].fclk != 0) { in vg_clk_mgr_helper_populate_bw_params() 590 bw_params->clk_table.entries[i].fclk_mhz = clock_table->DfPstateTable[j].fclk; in vg_clk_mgr_helper_populate_bw_params() 591 bw_params->clk_table.entries[i].memclk_mhz = clock_table->DfPstateTable[j].memclk; in vg_clk_mgr_helper_populate_bw_params() 592 bw_params->clk_table.entries[i].voltage = clock_table->DfPstateTable[j].voltage; in vg_clk_mgr_helper_populate_bw_params() 593 …bw_params->clk_table.entries[i].dcfclk_mhz = find_dcfclk_for_voltage(clock_table, clock_table->DfP… in vg_clk_mgr_helper_populate_bw_params() 595 bw_params->clk_table.entries[i].fclk_mhz = clock_table->DfPstateTable[j].fclk; in vg_clk_mgr_helper_populate_bw_params() [all …]
|
/linux/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ |
H A D | smu8_hwmgr.c | 437 struct SMU8_Fusion_ClkTable *clock_table; in smu8_upload_pptable_to_smu() local 462 clock_table = (struct SMU8_Fusion_ClkTable *)table; in smu8_upload_pptable_to_smu() 479 clock_table->SclkBreakdownTable.ClkLevel[i].GnbVid = in smu8_upload_pptable_to_smu() 481 clock_table->SclkBreakdownTable.ClkLevel[i].Frequency = in smu8_upload_pptable_to_smu() 485 clock_table->SclkBreakdownTable.ClkLevel[i].Frequency, in smu8_upload_pptable_to_smu() 488 clock_table->SclkBreakdownTable.ClkLevel[i].DfsDid = in smu8_upload_pptable_to_smu() 492 clock_table->SclkBreakdownTable.ClkLevel[i].GfxVid = in smu8_upload_pptable_to_smu() 496 clock_table->AclkBreakdownTable.ClkLevel[i].GfxVid = in smu8_upload_pptable_to_smu() 498 clock_table->AclkBreakdownTable.ClkLevel[i].Frequency = in smu8_upload_pptable_to_smu() 502 clock_table->AclkBreakdownTable.ClkLevel[i].Frequency, in smu8_upload_pptable_to_smu() [all …]
|
H A D | smu10_hwmgr.c | 499 DpmClocks_t *table = &(smu10_data->clock_table); in smu10_populate_clock_table() 511 &smu10_data->clock_table.DcefClocks[0]); in smu10_populate_clock_table() 514 &smu10_data->clock_table.SocClocks[0]); in smu10_populate_clock_table() 517 &smu10_data->clock_table.FClocks[0]); in smu10_populate_clock_table() 520 &smu10_data->clock_table.MemClocks[0]); in smu10_populate_clock_table() 643 if (min_mclk < data->clock_table.FClocks[0].Freq) in smu10_dpm_force_dpm_level() 644 min_mclk = data->clock_table.FClocks[0].Freq; in smu10_dpm_force_dpm_level()
|
H A D | processpptables.c | 410 struct phm_clock_array *clock_table; in get_valid_clk() local 412 clock_table = kzalloc(struct_size(clock_table, values, table->count), GFP_KERNEL); in get_valid_clk() 413 if (!clock_table) in get_valid_clk() 416 clock_table->count = (unsigned long)table->count; in get_valid_clk() 418 for (i = 0; i < clock_table->count; i++) in get_valid_clk() 419 clock_table->values[i] = (unsigned long)table->entries[i].clk; in get_valid_clk() 421 *ptable = clock_table; in get_valid_clk()
|
H A D | smu10_hwmgr.h | 297 DpmClocks_t clock_table; member
|
/linux/drivers/gpu/drm/amd/pm/swsmu/smu14/ |
H A D | smu_v14_0_0_ppt.c | 1544 static int smu_14_0_1_get_dpm_table(struct smu_context *smu, struct dpm_clocks *clock_table) in smu_14_0_1_get_dpm_table() argument 1551 …clock_table->SocClocks[idx].Freq = (idx < clk_table->NumSocClkLevelsEnabled) ? clk_table->SocClock… in smu_14_0_1_get_dpm_table() 1552 clock_table->SocClocks[idx].Vol = 0; in smu_14_0_1_get_dpm_table() 1556 …clock_table->VPEClocks[idx].Freq = (idx < clk_table->VpeClkLevelsEnabled) ? clk_table->VPEClocks[i… in smu_14_0_1_get_dpm_table() 1557 clock_table->VPEClocks[idx].Vol = 0; in smu_14_0_1_get_dpm_table() 1563 static int smu_14_0_0_get_dpm_table(struct smu_context *smu, struct dpm_clocks *clock_table) in smu_14_0_0_get_dpm_table() argument 1570 …clock_table->SocClocks[idx].Freq = (idx < clk_table->NumSocClkLevelsEnabled) ? clk_table->SocClock… in smu_14_0_0_get_dpm_table() 1571 clock_table->SocClocks[idx].Vol = 0; in smu_14_0_0_get_dpm_table() 1575 …clock_table->VPEClocks[idx].Freq = (idx < clk_table->VpeClkLevelsEnabled) ? clk_table->VPEClocks[i… in smu_14_0_0_get_dpm_table() 1576 clock_table->VPEClocks[idx].Vol = 0; in smu_14_0_0_get_dpm_table() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/ |
H A D | dml2_dpmm_dcn4.c | 226 …pm(unsigned long min_value, unsigned long *rounded_value, const struct dml2_clk_table *clock_table) in round_up_and_copy_to_next_dpm() argument 231 if (clock_table->num_clk_values > 2) { in round_up_and_copy_to_next_dpm() 232 while (index < clock_table->num_clk_values && clock_table->clk_values_khz[index] < min_value) in round_up_and_copy_to_next_dpm() 235 if (index < clock_table->num_clk_values) { in round_up_and_copy_to_next_dpm() 236 *rounded_value = clock_table->clk_values_khz[index]; in round_up_and_copy_to_next_dpm() 239 } else if (clock_table->clk_values_khz[clock_table->num_clk_values - 1] >= min_value) { in round_up_and_copy_to_next_dpm() 246 …tic bool round_up_to_next_dpm(unsigned long *clock_value, const struct dml2_clk_table *clock_table) in round_up_to_next_dpm() argument 248 return round_up_and_copy_to_next_dpm(*clock_value, clock_value, clock_table); in round_up_to_next_dpm()
|
/linux/drivers/gpu/drm/amd/display/dc/ |
H A D | dm_pp_smu.h | 286 struct dpm_clocks *clock_table); 306 struct dpm_clocks *clock_table);
|
/linux/drivers/tty/serial/8250/ |
H A D | 8250_fintek.c | 293 static u8 clock_table[] = { F81866_UART_CLK_1_8432MHZ, in fintek_8250_set_termios() local 335 clock_table[i]); in fintek_8250_set_termios()
|
/linux/drivers/gpu/drm/amd/display/amdgpu_dm/ |
H A D | amdgpu_dm_pp_smu.c | 727 struct pp_smu *pp, struct dpm_clocks *clock_table) in pp_rn_get_dpm_clock_table() argument 733 ret = amdgpu_dpm_get_dpm_clock_table(adev, clock_table); in pp_rn_get_dpm_clock_table()
|
/linux/drivers/usb/serial/ |
H A D | f81232.c | 128 static u8 const clock_table[] = { F81232_CLK_1_846_MHZ, F81232_CLK_14_77_MHZ, variable 520 F81232_CLK_MASK, clock_table[idx]); in f81232_set_baudrate()
|
H A D | f81534.c | 190 static u8 const clock_table[] = { F81534_CLK_1_846_MHZ, F81534_CLK_14_77_MHZ, variable 586 port_priv->shadow_clk |= clock_table[idx]; in f81534_set_port_config()
|
/linux/drivers/gpu/drm/amd/pm/ |
H A D | amdgpu_dpm.c | 1872 struct dpm_clocks *clock_table) in amdgpu_dpm_get_dpm_clock_table() argument 1882 clock_table); in amdgpu_dpm_get_dpm_clock_table()
|
/linux/drivers/gpu/drm/amd/include/ |
H A D | kgd_pp_interface.h | 489 struct dpm_clocks *clock_table);
|
/linux/drivers/gpu/drm/amd/pm/swsmu/ |
H A D | amdgpu_smu.c | 3489 struct dpm_clocks *clock_table) in smu_get_dpm_clock_table() argument 3498 ret = smu->ppt_funcs->get_dpm_clock_table(smu, clock_table); in smu_get_dpm_clock_table()
|