Lines Matching refs:hwmgr

97 static int tonga_start_in_protection_mode(struct pp_hwmgr *hwmgr)  in tonga_start_in_protection_mode()  argument
102 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
105 result = smu7_upload_smu_firmware_image(hwmgr); in tonga_start_in_protection_mode()
110 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
114 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
118 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
122 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
126 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
129 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, in tonga_start_in_protection_mode()
135 smu7_send_msg_to_smc_offset(hwmgr); in tonga_start_in_protection_mode()
138 PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL(hwmgr, SMC_IND, in tonga_start_in_protection_mode()
142 if (1 != PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, in tonga_start_in_protection_mode()
149 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, in tonga_start_in_protection_mode()
155 static int tonga_start_in_non_protection_mode(struct pp_hwmgr *hwmgr) in tonga_start_in_non_protection_mode() argument
160 PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL(hwmgr, SMC_IND, in tonga_start_in_non_protection_mode()
164 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
168 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
171 result = smu7_upload_smu_firmware_image(hwmgr); in tonga_start_in_non_protection_mode()
177 smu7_program_jump_on_start(hwmgr); in tonga_start_in_non_protection_mode()
180 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
184 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
188 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, in tonga_start_in_non_protection_mode()
194 static int tonga_start_smu(struct pp_hwmgr *hwmgr) in tonga_start_smu() argument
196 struct tonga_smumgr *priv = hwmgr->smu_backend; in tonga_start_smu()
200 if (!smu7_is_smc_ram_running(hwmgr) && hwmgr->not_vf) { in tonga_start_smu()
202 if (0 == PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in tonga_start_smu()
204 result = tonga_start_in_non_protection_mode(hwmgr); in tonga_start_smu()
208 result = tonga_start_in_protection_mode(hwmgr); in tonga_start_smu()
217 smu7_read_smc_sram_dword(hwmgr, in tonga_start_smu()
222 result = smu7_request_smu_load_fw(hwmgr); in tonga_start_smu()
227 static int tonga_smu_init(struct pp_hwmgr *hwmgr) in tonga_smu_init() argument
235 hwmgr->smu_backend = tonga_priv; in tonga_smu_init()
237 if (smu7_init(hwmgr)) { in tonga_smu_init()
246 static int tonga_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr, in tonga_get_dependency_volt_by_clk() argument
251 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_get_dependency_volt_by_clk()
253 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_get_dependency_volt_by_clk()
302 static int tonga_populate_smc_vddc_table(struct pp_hwmgr *hwmgr, in tonga_populate_smc_vddc_table() argument
306 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_vddc_table()
319 static int tonga_populate_smc_vdd_gfx_table(struct pp_hwmgr *hwmgr, in tonga_populate_smc_vdd_gfx_table() argument
323 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_vdd_gfx_table()
336 static int tonga_populate_smc_vdd_ci_table(struct pp_hwmgr *hwmgr, in tonga_populate_smc_vdd_ci_table() argument
339 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_vdd_ci_table()
366 static int tonga_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, in tonga_populate_smc_mvdd_table() argument
369 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_mvdd_table()
391 static int tonga_populate_cac_tables(struct pp_hwmgr *hwmgr, in tonga_populate_cac_tables() argument
396 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_cac_tables()
398 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_cac_tables()
446 static int tonga_populate_smc_voltage_tables(struct pp_hwmgr *hwmgr, in tonga_populate_smc_voltage_tables() argument
451 result = tonga_populate_smc_vddc_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
456 result = tonga_populate_smc_vdd_ci_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
461 result = tonga_populate_smc_vdd_gfx_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
466 result = tonga_populate_smc_mvdd_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
471 result = tonga_populate_cac_tables(hwmgr, table); in tonga_populate_smc_voltage_tables()
479 static int tonga_populate_ulv_level(struct pp_hwmgr *hwmgr, in tonga_populate_ulv_level() argument
483 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_ulv_level()
501 static int tonga_populate_ulv_state(struct pp_hwmgr *hwmgr, in tonga_populate_ulv_state() argument
504 return tonga_populate_ulv_level(hwmgr, &table->Ulv); in tonga_populate_ulv_state()
507 static int tonga_populate_smc_link_level(struct pp_hwmgr *hwmgr, SMU72_Discrete_DpmTable *table) in tonga_populate_smc_link_level() argument
509 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_link_level()
511 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_smc_link_level()
538 static int tonga_calculate_sclk_params(struct pp_hwmgr *hwmgr, in tonga_calculate_sclk_params() argument
541 const struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_calculate_sclk_params()
554 result = atomctrl_get_engine_pll_dividers_vi(hwmgr, engine_clock, &dividers); in tonga_calculate_sclk_params()
560 reference_clock = atomctrl_get_reference_clock(hwmgr); in tonga_calculate_sclk_params()
581 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_calculate_sclk_params()
586 if (0 == atomctrl_get_engine_clock_spread_spectrum(hwmgr, vcoFreq, &ss_info)) { in tonga_calculate_sclk_params()
616 static int tonga_populate_single_graphic_level(struct pp_hwmgr *hwmgr, in tonga_populate_single_graphic_level() argument
622 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_single_graphic_level()
624 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_single_graphic_level()
627 result = tonga_calculate_sclk_params(hwmgr, engine_clock, graphic_level); in tonga_populate_single_graphic_level()
629 if (hwmgr->od_enabled) in tonga_populate_single_graphic_level()
635 result = tonga_get_dependency_volt_by_clk(hwmgr, in tonga_populate_single_graphic_level()
659 hwmgr->display_config->min_core_set_clock_in_sr; in tonga_populate_single_graphic_level()
661 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_populate_single_graphic_level()
686 static int tonga_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) in tonga_populate_all_graphic_levels() argument
688 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_all_graphic_levels()
689 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_all_graphic_levels()
690 struct phm_ppt_v1_information *pptable_info = (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_all_graphic_levels()
711 result = tonga_populate_single_graphic_level(hwmgr, in tonga_populate_all_graphic_levels()
780 result = smu7_copy_bytes_to_smc(hwmgr, level_array_address, in tonga_populate_all_graphic_levels()
788 struct pp_hwmgr *hwmgr, in tonga_calculate_mclk_params() argument
795 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_calculate_mclk_params()
810 result = atomctrl_get_memory_pll_dividers_si(hwmgr, in tonga_calculate_mclk_params()
847 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_calculate_mclk_params()
867 uint32_t reference_clock = atomctrl_get_mpll_reference_clock(hwmgr); in tonga_calculate_mclk_params()
879 if (0 == atomctrl_get_memory_clock_spread_spectrum(hwmgr, freq_nom, &ss_info)) { in tonga_calculate_mclk_params()
960 struct pp_hwmgr *hwmgr, in tonga_populate_single_memory_level() argument
965 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_single_memory_level()
967 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_single_memory_level()
977 if (hwmgr->od_enabled) in tonga_populate_single_memory_level()
983 result = tonga_get_dependency_volt_by_clk(hwmgr, in tonga_populate_single_memory_level()
1016 data->display_timing.num_existing_displays = hwmgr->display_config->num_display; in tonga_populate_single_memory_level()
1017 data->display_timing.vrefresh = hwmgr->display_config->vrefresh; in tonga_populate_single_memory_level()
1022 && (PHM_READ_FIELD(hwmgr->device, DPG_PIPE_STUTTER_CONTROL, STUTTER_ENABLE) & 0x1) in tonga_populate_single_memory_level()
1048 ((cgs_read_register(hwmgr->device, mmMC_SEQ_MISC7) >> 16) & 0xf)) { in tonga_populate_single_memory_level()
1049 dll_state_on = ((cgs_read_register(hwmgr->device, mmMC_SEQ_MISC5) >> 1) & 0x1) ? 1 : 0; in tonga_populate_single_memory_level()
1051 dll_state_on = ((cgs_read_register(hwmgr->device, mmMC_SEQ_MISC6) >> 1) & 0x1) ? 1 : 0; in tonga_populate_single_memory_level()
1060 dll_state_on = ((cgs_read_register(hwmgr->device, mmMC_SEQ_MISC5) >> 1) & 0x1) ? 1 : 0; in tonga_populate_single_memory_level()
1063 result = tonga_calculate_mclk_params(hwmgr, in tonga_populate_single_memory_level()
1086 static int tonga_populate_all_memory_levels(struct pp_hwmgr *hwmgr) in tonga_populate_all_memory_levels() argument
1088 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_all_memory_levels()
1090 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_all_memory_levels()
1112 hwmgr, in tonga_populate_all_memory_levels()
1136 result = smu7_copy_bytes_to_smc(hwmgr, in tonga_populate_all_memory_levels()
1143 static int tonga_populate_mvdd_value(struct pp_hwmgr *hwmgr, in tonga_populate_mvdd_value() argument
1146 const struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_mvdd_value()
1148 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_mvdd_value()
1173 static int tonga_populate_smc_acpi_level(struct pp_hwmgr *hwmgr, in tonga_populate_smc_acpi_level() argument
1178 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_smc_acpi_level()
1179 const struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_acpi_level()
1195 table->ACPILevel.SclkFrequency = atomctrl_get_reference_clock(hwmgr); in tonga_populate_smc_acpi_level()
1198 result = atomctrl_get_engine_pll_dividers_vi(hwmgr, in tonga_populate_smc_acpi_level()
1246 if (0 == tonga_populate_mvdd_value(hwmgr, 0, &voltage_level)) in tonga_populate_smc_acpi_level()
1307 static int tonga_populate_smc_uvd_level(struct pp_hwmgr *hwmgr, in tonga_populate_smc_uvd_level() argument
1314 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_uvd_level()
1316 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_smc_uvd_level()
1340 hwmgr, in tonga_populate_smc_uvd_level()
1350 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in tonga_populate_smc_uvd_level()
1367 static int tonga_populate_smc_vce_level(struct pp_hwmgr *hwmgr, in tonga_populate_smc_vce_level() argument
1374 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_vce_level()
1376 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_smc_vce_level()
1399 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in tonga_populate_smc_vce_level()
1413 static int tonga_populate_smc_acp_level(struct pp_hwmgr *hwmgr, in tonga_populate_smc_acp_level() argument
1419 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_acp_level()
1421 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_smc_acp_level()
1444 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in tonga_populate_smc_acp_level()
1458 struct pp_hwmgr *hwmgr, in tonga_populate_memory_timing_parameters() argument
1469 result = atomctrl_set_engine_dram_timings_rv770(hwmgr, in tonga_populate_memory_timing_parameters()
1475 dramTiming = cgs_read_register(hwmgr->device, mmMC_ARB_DRAM_TIMING); in tonga_populate_memory_timing_parameters()
1476 dramTiming2 = cgs_read_register(hwmgr->device, mmMC_ARB_DRAM_TIMING2); in tonga_populate_memory_timing_parameters()
1477 burstTime = PHM_READ_FIELD(hwmgr->device, MC_ARB_BURST_TIME, STATE0); in tonga_populate_memory_timing_parameters()
1486 static int tonga_program_memory_timing_parameters(struct pp_hwmgr *hwmgr) in tonga_program_memory_timing_parameters() argument
1488 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_program_memory_timing_parameters()
1490 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_program_memory_timing_parameters()
1500 (hwmgr, data->dpm_table.sclk_table.dpm_levels[i].value, in tonga_program_memory_timing_parameters()
1511 hwmgr, in tonga_program_memory_timing_parameters()
1522 static int tonga_populate_smc_boot_level(struct pp_hwmgr *hwmgr, in tonga_populate_smc_boot_level() argument
1526 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_smc_boot_level()
1528 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_smc_boot_level()
1573 static int tonga_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr) in tonga_populate_clock_stretcher_data_table() argument
1579 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_clock_stretcher_data_table()
1583 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_clock_stretcher_data_table()
1587 struct amdgpu_device *adev = hwmgr->adev; in tonga_populate_clock_stretcher_data_table()
1597 efuse = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_populate_clock_stretcher_data_table()
1599 efuse2 = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_populate_clock_stretcher_data_table()
1644 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, PWR_CKS_ENABLE, in tonga_populate_clock_stretcher_data_table()
1646 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, PWR_CKS_ENABLE, in tonga_populate_clock_stretcher_data_table()
1648 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, PWR_CKS_ENABLE, in tonga_populate_clock_stretcher_data_table()
1650 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, PWR_CKS_ENABLE, in tonga_populate_clock_stretcher_data_table()
1659 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_populate_clock_stretcher_data_table()
1666 value = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_populate_clock_stretcher_data_table()
1698 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_populate_clock_stretcher_data_table()
1737 value = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_populate_clock_stretcher_data_table()
1740 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_populate_clock_stretcher_data_table()
1746 static int tonga_populate_vr_config(struct pp_hwmgr *hwmgr, in tonga_populate_vr_config() argument
1749 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_populate_vr_config()
1797 static int tonga_init_arb_table_index(struct pp_hwmgr *hwmgr) in tonga_init_arb_table_index() argument
1799 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_init_arb_table_index()
1812 result = smu7_read_smc_sram_dword(hwmgr, in tonga_init_arb_table_index()
1821 return smu7_write_smc_sram_dword(hwmgr, in tonga_init_arb_table_index()
1826 static int tonga_populate_bapm_parameters_in_dpm_table(struct pp_hwmgr *hwmgr) in tonga_populate_bapm_parameters_in_dpm_table() argument
1829 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_bapm_parameters_in_dpm_table()
1833 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_bapm_parameters_in_dpm_table()
1873 static int tonga_populate_svi_load_line(struct pp_hwmgr *hwmgr) in tonga_populate_svi_load_line() argument
1876 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_svi_load_line()
1887 static int tonga_populate_tdc_limit(struct pp_hwmgr *hwmgr) in tonga_populate_tdc_limit() argument
1891 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_tdc_limit()
1894 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_tdc_limit()
1909 static int tonga_populate_dw8(struct pp_hwmgr *hwmgr, uint32_t fuse_table_offset) in tonga_populate_dw8() argument
1912 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_dw8()
1916 if (smu7_read_smc_sram_dword(hwmgr, in tonga_populate_dw8()
1930 static int tonga_populate_temperature_scaler(struct pp_hwmgr *hwmgr) in tonga_populate_temperature_scaler() argument
1934 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_temperature_scaler()
1943 static int tonga_populate_fuzzy_fan(struct pp_hwmgr *hwmgr) in tonga_populate_fuzzy_fan() argument
1945 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_fuzzy_fan()
1947 if ((hwmgr->thermal_controller.advanceFanControlParameters. in tonga_populate_fuzzy_fan()
1949 (hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity == 0)) in tonga_populate_fuzzy_fan()
1950 hwmgr->thermal_controller.advanceFanControlParameters. in tonga_populate_fuzzy_fan()
1951 usFanOutputSensitivity = hwmgr->thermal_controller. in tonga_populate_fuzzy_fan()
1955 PP_HOST_TO_SMC_US(hwmgr->thermal_controller. in tonga_populate_fuzzy_fan()
1960 static int tonga_populate_gnb_lpml(struct pp_hwmgr *hwmgr) in tonga_populate_gnb_lpml() argument
1964 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_gnb_lpml()
1973 static int tonga_populate_bapm_vddc_base_leakage_sidd(struct pp_hwmgr *hwmgr) in tonga_populate_bapm_vddc_base_leakage_sidd() argument
1976 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_bapm_vddc_base_leakage_sidd()
1978 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_populate_bapm_vddc_base_leakage_sidd()
1994 static int tonga_populate_pm_fuses(struct pp_hwmgr *hwmgr) in tonga_populate_pm_fuses() argument
1997 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_pm_fuses()
2000 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_populate_pm_fuses()
2002 if (smu7_read_smc_sram_dword(hwmgr, in tonga_populate_pm_fuses()
2011 if (tonga_populate_svi_load_line(hwmgr)) in tonga_populate_pm_fuses()
2016 if (tonga_populate_tdc_limit(hwmgr)) in tonga_populate_pm_fuses()
2021 if (tonga_populate_dw8(hwmgr, pm_fuse_table_offset)) in tonga_populate_pm_fuses()
2027 if (tonga_populate_temperature_scaler(hwmgr) != 0) in tonga_populate_pm_fuses()
2033 if (tonga_populate_fuzzy_fan(hwmgr)) in tonga_populate_pm_fuses()
2040 if (tonga_populate_gnb_lpml(hwmgr)) in tonga_populate_pm_fuses()
2046 if (tonga_populate_bapm_vddc_base_leakage_sidd(hwmgr)) in tonga_populate_pm_fuses()
2053 if (smu7_copy_bytes_to_smc(hwmgr, pm_fuse_table_offset, in tonga_populate_pm_fuses()
2063 static int tonga_populate_mc_reg_address(struct pp_hwmgr *hwmgr, in tonga_populate_mc_reg_address() argument
2066 const struct tonga_smumgr *smu_data = (struct tonga_smumgr *)hwmgr->smu_backend; in tonga_populate_mc_reg_address()
2107 struct pp_hwmgr *hwmgr, in tonga_convert_mc_reg_table_entry_to_smc() argument
2112 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_convert_mc_reg_table_entry_to_smc()
2132 static int tonga_convert_mc_reg_table_to_smc(struct pp_hwmgr *hwmgr, in tonga_convert_mc_reg_table_to_smc() argument
2136 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_convert_mc_reg_table_to_smc()
2142 hwmgr, in tonga_convert_mc_reg_table_to_smc()
2154 static int tonga_update_and_upload_mc_reg_table(struct pp_hwmgr *hwmgr) in tonga_update_and_upload_mc_reg_table() argument
2156 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_update_and_upload_mc_reg_table()
2157 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_update_and_upload_mc_reg_table()
2167 result = tonga_convert_mc_reg_table_to_smc(hwmgr, &(smu_data->mc_regs)); in tonga_update_and_upload_mc_reg_table()
2177 hwmgr, address, in tonga_update_and_upload_mc_reg_table()
2184 static int tonga_populate_initial_mc_reg_table(struct pp_hwmgr *hwmgr) in tonga_populate_initial_mc_reg_table() argument
2187 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_populate_initial_mc_reg_table()
2190 result = tonga_populate_mc_reg_address(hwmgr, &(smu_data->mc_regs)); in tonga_populate_initial_mc_reg_table()
2195 result = tonga_convert_mc_reg_table_to_smc(hwmgr, &smu_data->mc_regs); in tonga_populate_initial_mc_reg_table()
2200 return smu7_copy_bytes_to_smc(hwmgr, smu_data->smu7_data.mc_reg_table_start, in tonga_populate_initial_mc_reg_table()
2204 static void tonga_initialize_power_tune_defaults(struct pp_hwmgr *hwmgr) in tonga_initialize_power_tune_defaults() argument
2206 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_initialize_power_tune_defaults()
2208 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_initialize_power_tune_defaults()
2220 static int tonga_init_smc_table(struct pp_hwmgr *hwmgr) in tonga_init_smc_table() argument
2223 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_init_smc_table()
2225 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_init_smc_table()
2228 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_init_smc_table()
2236 tonga_initialize_power_tune_defaults(hwmgr); in tonga_init_smc_table()
2239 tonga_populate_smc_voltage_tables(hwmgr, table); in tonga_init_smc_table()
2241 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2246 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2253 i = PHM_READ_FIELD(hwmgr->device, CC_MC_MAX_CHANNEL, NOOFCHAN); in tonga_init_smc_table()
2259 result = tonga_populate_ulv_state(hwmgr, table); in tonga_init_smc_table()
2264 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in tonga_init_smc_table()
2268 result = tonga_populate_smc_link_level(hwmgr, table); in tonga_init_smc_table()
2272 result = tonga_populate_all_graphic_levels(hwmgr); in tonga_init_smc_table()
2276 result = tonga_populate_all_memory_levels(hwmgr); in tonga_init_smc_table()
2280 result = tonga_populate_smc_acpi_level(hwmgr, table); in tonga_init_smc_table()
2284 result = tonga_populate_smc_vce_level(hwmgr, table); in tonga_init_smc_table()
2288 result = tonga_populate_smc_acp_level(hwmgr, table); in tonga_init_smc_table()
2296 result = tonga_program_memory_timing_parameters(hwmgr); in tonga_init_smc_table()
2301 result = tonga_populate_smc_uvd_level(hwmgr, table); in tonga_init_smc_table()
2305 result = tonga_populate_smc_boot_level(hwmgr, table); in tonga_init_smc_table()
2309 tonga_populate_bapm_parameters_in_dpm_table(hwmgr); in tonga_init_smc_table()
2313 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2315 result = tonga_populate_clock_stretcher_data_table(hwmgr); in tonga_init_smc_table()
2354 result = tonga_populate_vr_config(hwmgr, table); in tonga_init_smc_table()
2361 if (atomctrl_get_pp_assign_pin(hwmgr, VDDC_VRHOT_GPIO_PINID, in tonga_init_smc_table()
2364 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2368 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2372 if (atomctrl_get_pp_assign_pin(hwmgr, PP_AC_DC_SWITCH_GPIO_PINID, in tonga_init_smc_table()
2375 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2379 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2383 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2387 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2389 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2393 if (atomctrl_get_pp_assign_pin(hwmgr, in tonga_init_smc_table()
2395 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2401 (0 == (cgs_read_register(hwmgr->device, mmGPIOPAD_A) & in tonga_init_smc_table()
2407 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2409 phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2414 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_init_smc_table()
2436 hwmgr, in tonga_init_smc_table()
2445 result = tonga_init_arb_table_index(hwmgr); in tonga_init_smc_table()
2449 tonga_populate_pm_fuses(hwmgr); in tonga_init_smc_table()
2453 result = tonga_populate_initial_mc_reg_table(hwmgr); in tonga_init_smc_table()
2460 static int tonga_thermal_setup_fan_table(struct pp_hwmgr *hwmgr) in tonga_thermal_setup_fan_table() argument
2463 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_thermal_setup_fan_table()
2472 if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_thermal_setup_fan_table()
2476 if (hwmgr->thermal_controller.fanInfo.bNoFan) { in tonga_thermal_setup_fan_table()
2477 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_thermal_setup_fan_table()
2483 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_thermal_setup_fan_table()
2488 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, in tonga_thermal_setup_fan_table()
2493 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in tonga_thermal_setup_fan_table()
2498 tmp64 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMMin * duty100; in tonga_thermal_setup_fan_table()
2502 t_diff1 = hwmgr->thermal_controller.advanceFanControlParameters.usTMed - in tonga_thermal_setup_fan_table()
2503 hwmgr->thermal_controller.advanceFanControlParameters.usTMin; in tonga_thermal_setup_fan_table()
2504 t_diff2 = hwmgr->thermal_controller.advanceFanControlParameters.usTHigh - in tonga_thermal_setup_fan_table()
2505 hwmgr->thermal_controller.advanceFanControlParameters.usTMed; in tonga_thermal_setup_fan_table()
2507 pwm_diff1 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMMed - in tonga_thermal_setup_fan_table()
2508 hwmgr->thermal_controller.advanceFanControlParameters.usPWMMin; in tonga_thermal_setup_fan_table()
2509 pwm_diff2 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMHigh - in tonga_thermal_setup_fan_table()
2510 hwmgr->thermal_controller.advanceFanControlParameters.usPWMMed; in tonga_thermal_setup_fan_table()
2515 …fan_table.TempMin = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMin… in tonga_thermal_setup_fan_table()
2516 …fan_table.TempMed = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMed… in tonga_thermal_setup_fan_table()
2517 …fan_table.TempMax = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMax… in tonga_thermal_setup_fan_table()
2524 fan_table.HystDown = cpu_to_be16(hwmgr->thermal_controller.advanceFanControlParameters.ucTHyst); in tonga_thermal_setup_fan_table()
2532 reference_clock = amdgpu_asic_get_xclk((struct amdgpu_device *)hwmgr->adev); in tonga_thermal_setup_fan_table()
2534 …fan_table.RefreshPeriod = cpu_to_be32((hwmgr->thermal_controller.advanceFanControlParameters.ulCyc… in tonga_thermal_setup_fan_table()
2538 …fan_table.TempSrc = (uint8_t)PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, CG_MULT… in tonga_thermal_setup_fan_table()
2542 res = smu7_copy_bytes_to_smc(hwmgr, in tonga_thermal_setup_fan_table()
2552 static int tonga_program_mem_timing_parameters(struct pp_hwmgr *hwmgr) in tonga_program_mem_timing_parameters() argument
2554 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_program_mem_timing_parameters()
2558 return tonga_program_memory_timing_parameters(hwmgr); in tonga_program_mem_timing_parameters()
2563 static int tonga_update_sclk_threshold(struct pp_hwmgr *hwmgr) in tonga_update_sclk_threshold() argument
2565 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_update_sclk_threshold()
2567 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_update_sclk_threshold()
2572 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_update_sclk_threshold()
2581 hwmgr, in tonga_update_sclk_threshold()
2590 result = tonga_update_and_upload_mc_reg_table(hwmgr); in tonga_update_sclk_threshold()
2596 result = tonga_program_mem_timing_parameters(hwmgr); in tonga_update_sclk_threshold()
2675 static int tonga_update_uvd_smc_table(struct pp_hwmgr *hwmgr) in tonga_update_uvd_smc_table() argument
2678 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_update_uvd_smc_table()
2681 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_update_uvd_smc_table()
2691 mm_boot_level_value = cgs_read_ind_register(hwmgr->device, in tonga_update_uvd_smc_table()
2695 cgs_write_ind_register(hwmgr->device, in tonga_update_uvd_smc_table()
2699 if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_update_uvd_smc_table()
2701 phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_update_uvd_smc_table()
2703 smum_send_msg_to_smc_with_parameter(hwmgr, in tonga_update_uvd_smc_table()
2710 static int tonga_update_vce_smc_table(struct pp_hwmgr *hwmgr) in tonga_update_vce_smc_table() argument
2713 (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_update_vce_smc_table()
2716 (struct phm_ppt_v1_information *)(hwmgr->pptable); in tonga_update_vce_smc_table()
2726 mm_boot_level_value = cgs_read_ind_register(hwmgr->device, in tonga_update_vce_smc_table()
2730 cgs_write_ind_register(hwmgr->device, in tonga_update_vce_smc_table()
2733 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in tonga_update_vce_smc_table()
2735 smum_send_msg_to_smc_with_parameter(hwmgr, in tonga_update_vce_smc_table()
2742 static int tonga_update_smc_table(struct pp_hwmgr *hwmgr, uint32_t type) in tonga_update_smc_table() argument
2746 tonga_update_uvd_smc_table(hwmgr); in tonga_update_smc_table()
2749 tonga_update_vce_smc_table(hwmgr); in tonga_update_smc_table()
2757 static int tonga_process_firmware_header(struct pp_hwmgr *hwmgr) in tonga_process_firmware_header() argument
2759 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_process_firmware_header()
2760 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_process_firmware_header()
2766 result = smu7_read_smc_sram_dword(hwmgr, in tonga_process_firmware_header()
2776 result = smu7_read_smc_sram_dword(hwmgr, in tonga_process_firmware_header()
2789 result = smu7_read_smc_sram_dword(hwmgr, in tonga_process_firmware_header()
2797 result = smu7_read_smc_sram_dword(hwmgr, in tonga_process_firmware_header()
2807 result = smu7_read_smc_sram_dword(hwmgr, in tonga_process_firmware_header()
2817 result = smu7_read_smc_sram_dword(hwmgr, in tonga_process_firmware_header()
2823 hwmgr->microcode_version_info.SMC = tmp; in tonga_process_firmware_header()
2832 static uint8_t tonga_get_memory_modile_index(struct pp_hwmgr *hwmgr) in tonga_get_memory_modile_index() argument
2834 return (uint8_t) (0xFF & (cgs_read_register(hwmgr->device, mmBIOS_SCRATCH_4) >> 16)); in tonga_get_memory_modile_index()
2974 static int tonga_set_mc_special_registers(struct pp_hwmgr *hwmgr, in tonga_set_mc_special_registers() argument
2979 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_set_mc_special_registers()
2988 temp_reg = cgs_read_register(hwmgr->device, in tonga_set_mc_special_registers()
3001 temp_reg = cgs_read_register(hwmgr->device, mmMC_PMG_CMD_MRS); in tonga_set_mc_special_registers()
3028 temp_reg = cgs_read_register(hwmgr->device, mmMC_PMG_CMD_MRS1); in tonga_set_mc_special_registers()
3067 static int tonga_initialize_mc_reg_table(struct pp_hwmgr *hwmgr) in tonga_initialize_mc_reg_table() argument
3070 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend); in tonga_initialize_mc_reg_table()
3073 uint8_t module_index = tonga_get_memory_modile_index(hwmgr); in tonga_initialize_mc_reg_table()
3081 cgs_write_register(hwmgr->device, mmMC_SEQ_RAS_TIMING_LP, in tonga_initialize_mc_reg_table()
3082 cgs_read_register(hwmgr->device, mmMC_SEQ_RAS_TIMING)); in tonga_initialize_mc_reg_table()
3083 cgs_write_register(hwmgr->device, mmMC_SEQ_CAS_TIMING_LP, in tonga_initialize_mc_reg_table()
3084 cgs_read_register(hwmgr->device, mmMC_SEQ_CAS_TIMING)); in tonga_initialize_mc_reg_table()
3085 cgs_write_register(hwmgr->device, mmMC_SEQ_DLL_STBY_LP, in tonga_initialize_mc_reg_table()
3086 cgs_read_register(hwmgr->device, mmMC_SEQ_DLL_STBY)); in tonga_initialize_mc_reg_table()
3087 cgs_write_register(hwmgr->device, mmMC_SEQ_G5PDX_CMD0_LP, in tonga_initialize_mc_reg_table()
3088 cgs_read_register(hwmgr->device, mmMC_SEQ_G5PDX_CMD0)); in tonga_initialize_mc_reg_table()
3089 cgs_write_register(hwmgr->device, mmMC_SEQ_G5PDX_CMD1_LP, in tonga_initialize_mc_reg_table()
3090 cgs_read_register(hwmgr->device, mmMC_SEQ_G5PDX_CMD1)); in tonga_initialize_mc_reg_table()
3091 cgs_write_register(hwmgr->device, mmMC_SEQ_G5PDX_CTRL_LP, in tonga_initialize_mc_reg_table()
3092 cgs_read_register(hwmgr->device, mmMC_SEQ_G5PDX_CTRL)); in tonga_initialize_mc_reg_table()
3093 cgs_write_register(hwmgr->device, mmMC_SEQ_PMG_DVS_CMD_LP, in tonga_initialize_mc_reg_table()
3094 cgs_read_register(hwmgr->device, mmMC_SEQ_PMG_DVS_CMD)); in tonga_initialize_mc_reg_table()
3095 cgs_write_register(hwmgr->device, mmMC_SEQ_PMG_DVS_CTL_LP, in tonga_initialize_mc_reg_table()
3096 cgs_read_register(hwmgr->device, mmMC_SEQ_PMG_DVS_CTL)); in tonga_initialize_mc_reg_table()
3097 cgs_write_register(hwmgr->device, mmMC_SEQ_MISC_TIMING_LP, in tonga_initialize_mc_reg_table()
3098 cgs_read_register(hwmgr->device, mmMC_SEQ_MISC_TIMING)); in tonga_initialize_mc_reg_table()
3099 cgs_write_register(hwmgr->device, mmMC_SEQ_MISC_TIMING2_LP, in tonga_initialize_mc_reg_table()
3100 cgs_read_register(hwmgr->device, mmMC_SEQ_MISC_TIMING2)); in tonga_initialize_mc_reg_table()
3101 cgs_write_register(hwmgr->device, mmMC_SEQ_PMG_CMD_EMRS_LP, in tonga_initialize_mc_reg_table()
3102 cgs_read_register(hwmgr->device, mmMC_PMG_CMD_EMRS)); in tonga_initialize_mc_reg_table()
3103 cgs_write_register(hwmgr->device, mmMC_SEQ_PMG_CMD_MRS_LP, in tonga_initialize_mc_reg_table()
3104 cgs_read_register(hwmgr->device, mmMC_PMG_CMD_MRS)); in tonga_initialize_mc_reg_table()
3105 cgs_write_register(hwmgr->device, mmMC_SEQ_PMG_CMD_MRS1_LP, in tonga_initialize_mc_reg_table()
3106 cgs_read_register(hwmgr->device, mmMC_PMG_CMD_MRS1)); in tonga_initialize_mc_reg_table()
3107 cgs_write_register(hwmgr->device, mmMC_SEQ_WR_CTL_D0_LP, in tonga_initialize_mc_reg_table()
3108 cgs_read_register(hwmgr->device, mmMC_SEQ_WR_CTL_D0)); in tonga_initialize_mc_reg_table()
3109 cgs_write_register(hwmgr->device, mmMC_SEQ_WR_CTL_D1_LP, in tonga_initialize_mc_reg_table()
3110 cgs_read_register(hwmgr->device, mmMC_SEQ_WR_CTL_D1)); in tonga_initialize_mc_reg_table()
3111 cgs_write_register(hwmgr->device, mmMC_SEQ_RD_CTL_D0_LP, in tonga_initialize_mc_reg_table()
3112 cgs_read_register(hwmgr->device, mmMC_SEQ_RD_CTL_D0)); in tonga_initialize_mc_reg_table()
3113 cgs_write_register(hwmgr->device, mmMC_SEQ_RD_CTL_D1_LP, in tonga_initialize_mc_reg_table()
3114 cgs_read_register(hwmgr->device, mmMC_SEQ_RD_CTL_D1)); in tonga_initialize_mc_reg_table()
3115 cgs_write_register(hwmgr->device, mmMC_SEQ_PMG_TIMING_LP, in tonga_initialize_mc_reg_table()
3116 cgs_read_register(hwmgr->device, mmMC_SEQ_PMG_TIMING)); in tonga_initialize_mc_reg_table()
3117 cgs_write_register(hwmgr->device, mmMC_SEQ_PMG_CMD_MRS2_LP, in tonga_initialize_mc_reg_table()
3118 cgs_read_register(hwmgr->device, mmMC_PMG_CMD_MRS2)); in tonga_initialize_mc_reg_table()
3119 cgs_write_register(hwmgr->device, mmMC_SEQ_WR_CTL_2_LP, in tonga_initialize_mc_reg_table()
3120 cgs_read_register(hwmgr->device, mmMC_SEQ_WR_CTL_2)); in tonga_initialize_mc_reg_table()
3122 result = atomctrl_initialize_mc_reg_table(hwmgr, module_index, table); in tonga_initialize_mc_reg_table()
3129 result = tonga_set_mc_special_registers(hwmgr, ni_table); in tonga_initialize_mc_reg_table()
3140 static bool tonga_is_dpm_running(struct pp_hwmgr *hwmgr) in tonga_is_dpm_running() argument
3142 return (1 == PHM_READ_INDIRECT_FIELD(hwmgr->device, in tonga_is_dpm_running()
3147 static int tonga_update_dpm_settings(struct pp_hwmgr *hwmgr, in tonga_update_dpm_settings() argument
3150 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in tonga_update_dpm_settings()
3152 (hwmgr->smu_backend); in tonga_update_dpm_settings()
3173 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SCLKDPM_FreezeLevel, NULL); in tonga_update_dpm_settings()
3182 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in tonga_update_dpm_settings()
3184 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in tonga_update_dpm_settings()
3196 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in tonga_update_dpm_settings()
3199 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in tonga_update_dpm_settings()
3203 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SCLKDPM_UnfreezeLevel, NULL); in tonga_update_dpm_settings()
3208 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_MCLKDPM_FreezeLevel, NULL); in tonga_update_dpm_settings()
3217 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in tonga_update_dpm_settings()
3219 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in tonga_update_dpm_settings()
3231 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in tonga_update_dpm_settings()
3234 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in tonga_update_dpm_settings()
3238 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_MCLKDPM_UnfreezeLevel, NULL); in tonga_update_dpm_settings()