Lines Matching refs:hwmgr
96 static int polaris10_perform_btc(struct pp_hwmgr *hwmgr) in polaris10_perform_btc() argument
99 struct smu7_smumgr *smu_data = (struct smu7_smumgr *)(hwmgr->smu_backend); in polaris10_perform_btc()
102 …if (0 != smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_PerformBtc, smu_data->avfs_btc_param, in polaris10_perform_btc()
111 cgs_write_register(hwmgr->device, mmCP_MEC_CNTL, 0x50000000); in polaris10_perform_btc()
113 cgs_write_register(hwmgr->device, mmGRBM_SOFT_RESET, 0xffffffff); in polaris10_perform_btc()
114 cgs_write_register(hwmgr->device, mmGRBM_SOFT_RESET, 0); in polaris10_perform_btc()
120 static int polaris10_setup_graphics_level_structure(struct pp_hwmgr *hwmgr) in polaris10_setup_graphics_level_structure() argument
131 PP_ASSERT_WITH_CODE(0 == smu7_read_smc_sram_dword(hwmgr, in polaris10_setup_graphics_level_structure()
142 PP_ASSERT_WITH_CODE(0 == smu7_copy_bytes_to_smc(hwmgr, vr_config_address, in polaris10_setup_graphics_level_structure()
149 PP_ASSERT_WITH_CODE(0 == smu7_copy_bytes_to_smc(hwmgr, graphics_level_address, in polaris10_setup_graphics_level_structure()
157 PP_ASSERT_WITH_CODE(0 == smu7_copy_bytes_to_smc(hwmgr, graphics_level_address, in polaris10_setup_graphics_level_structure()
166 PP_ASSERT_WITH_CODE(0 == smu7_copy_bytes_to_smc(hwmgr, graphics_level_address, in polaris10_setup_graphics_level_structure()
175 static int polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr) in polaris10_avfs_event_mgr() argument
177 struct smu7_smumgr *smu_data = (struct smu7_smumgr *)(hwmgr->smu_backend); in polaris10_avfs_event_mgr()
179 if (!hwmgr->avfs_supported) in polaris10_avfs_event_mgr()
182 PP_ASSERT_WITH_CODE(0 == polaris10_setup_graphics_level_structure(hwmgr), in polaris10_avfs_event_mgr()
188 PP_ASSERT_WITH_CODE(0 == smu7_setup_pwr_virus(hwmgr), in polaris10_avfs_event_mgr()
193 PP_ASSERT_WITH_CODE(0 == polaris10_perform_btc(hwmgr), in polaris10_avfs_event_mgr()
200 static int polaris10_start_smu_in_protection_mode(struct pp_hwmgr *hwmgr) in polaris10_start_smu_in_protection_mode() argument
208 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_protection_mode()
211 result = smu7_upload_smu_firmware_image(hwmgr); in polaris10_start_smu_in_protection_mode()
216 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixSMU_STATUS, 0); in polaris10_start_smu_in_protection_mode()
218 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_protection_mode()
222 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_protection_mode()
226 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, RCU_UC_EVENTS, INTERRUPTS_ENABLED, 1); in polaris10_start_smu_in_protection_mode()
230 smu7_send_msg_to_smc_offset(hwmgr); in polaris10_start_smu_in_protection_mode()
235 PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL(hwmgr, SMC_IND, SMU_STATUS, SMU_DONE, 0); in polaris10_start_smu_in_protection_mode()
237 if (1 != PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_protection_mode()
241 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixFIRMWARE_FLAGS, 0); in polaris10_start_smu_in_protection_mode()
243 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_protection_mode()
246 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_protection_mode()
250 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS, INTERRUPTS_ENABLED, 1); in polaris10_start_smu_in_protection_mode()
255 static int polaris10_start_smu_in_non_protection_mode(struct pp_hwmgr *hwmgr) in polaris10_start_smu_in_non_protection_mode() argument
260 PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL(hwmgr, SMC_IND, RCU_UC_EVENTS, boot_seq_done, 0); in polaris10_start_smu_in_non_protection_mode()
264 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_non_protection_mode()
267 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_non_protection_mode()
271 result = smu7_upload_smu_firmware_image(hwmgr); in polaris10_start_smu_in_non_protection_mode()
276 smu7_program_jump_on_start(hwmgr); in polaris10_start_smu_in_non_protection_mode()
278 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_non_protection_mode()
281 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_start_smu_in_non_protection_mode()
286 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, in polaris10_start_smu_in_non_protection_mode()
292 static int polaris10_start_smu(struct pp_hwmgr *hwmgr) in polaris10_start_smu() argument
295 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_start_smu()
298 if (!smu7_is_smc_ram_running(hwmgr) && hwmgr->not_vf) { in polaris10_start_smu()
299 …smu_data->protected_mode = (uint8_t) (PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC… in polaris10_start_smu()
300 …smu_data->smu7_data.security_hard_key = (uint8_t) (PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS… in polaris10_start_smu()
304 result = polaris10_start_smu_in_non_protection_mode(hwmgr); in polaris10_start_smu()
306 result = polaris10_start_smu_in_protection_mode(hwmgr); in polaris10_start_smu()
311 polaris10_avfs_event_mgr(hwmgr); in polaris10_start_smu()
315 …smu7_read_smc_sram_dword(hwmgr, SMU7_FIRMWARE_HEADER_LOCATION + offsetof(SMU74_Firmware_Header, So… in polaris10_start_smu()
318 result = smu7_request_smu_load_fw(hwmgr); in polaris10_start_smu()
323 static bool polaris10_is_hw_avfs_present(struct pp_hwmgr *hwmgr) in polaris10_is_hw_avfs_present() argument
327 efuse = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixSMU_EFUSE_0 + (49*4)); in polaris10_is_hw_avfs_present()
335 static int polaris10_smu_init(struct pp_hwmgr *hwmgr) in polaris10_smu_init() argument
343 hwmgr->smu_backend = smu_data; in polaris10_smu_init()
345 if (smu7_init(hwmgr)) { in polaris10_smu_init()
353 static int polaris10_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr, in polaris10_get_dependency_volt_by_clk() argument
359 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_get_dependency_volt_by_clk()
427 static int polaris10_populate_bapm_parameters_in_dpm_table(struct pp_hwmgr *hwmgr) in polaris10_populate_bapm_parameters_in_dpm_table() argument
429 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_bapm_parameters_in_dpm_table()
434 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_bapm_parameters_in_dpm_table()
437 &hwmgr->thermal_controller.advanceFanControlParameters; in polaris10_populate_bapm_parameters_in_dpm_table()
475 static void polaris10_populate_zero_rpm_parameters(struct pp_hwmgr *hwmgr) in polaris10_populate_zero_rpm_parameters() argument
477 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_zero_rpm_parameters()
480 ((uint16_t)hwmgr->thermal_controller.advanceFanControlParameters.ucFanStopTemperature) << 8; in polaris10_populate_zero_rpm_parameters()
482 ((uint16_t)hwmgr->thermal_controller.advanceFanControlParameters.ucFanStartTemperature) << 8; in polaris10_populate_zero_rpm_parameters()
484 if (hwmgr->thermal_controller.advanceFanControlParameters.ucEnableZeroRPM) { in polaris10_populate_zero_rpm_parameters()
490 static int polaris10_populate_svi_load_line(struct pp_hwmgr *hwmgr) in polaris10_populate_svi_load_line() argument
492 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_svi_load_line()
503 static int polaris10_populate_tdc_limit(struct pp_hwmgr *hwmgr) in polaris10_populate_tdc_limit() argument
506 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_tdc_limit()
508 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_tdc_limit()
521 static int polaris10_populate_dw8(struct pp_hwmgr *hwmgr, uint32_t fuse_table_offset) in polaris10_populate_dw8() argument
523 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_dw8()
527 if (smu7_read_smc_sram_dword(hwmgr, in polaris10_populate_dw8()
545 static int polaris10_populate_temperature_scaler(struct pp_hwmgr *hwmgr) in polaris10_populate_temperature_scaler() argument
548 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_temperature_scaler()
557 static int polaris10_populate_fuzzy_fan(struct pp_hwmgr *hwmgr) in polaris10_populate_fuzzy_fan() argument
559 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_fuzzy_fan()
562 if ((hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity & (1 << 15)) in polaris10_populate_fuzzy_fan()
563 || 0 == hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity) in polaris10_populate_fuzzy_fan()
564 hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity = in polaris10_populate_fuzzy_fan()
565 hwmgr->thermal_controller.advanceFanControlParameters.usDefaultFanOutputSensitivity; in polaris10_populate_fuzzy_fan()
568 hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity); in polaris10_populate_fuzzy_fan()
572 static int polaris10_populate_gnb_lpml(struct pp_hwmgr *hwmgr) in polaris10_populate_gnb_lpml() argument
575 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_gnb_lpml()
584 static int polaris10_populate_bapm_vddc_base_leakage_sidd(struct pp_hwmgr *hwmgr) in polaris10_populate_bapm_vddc_base_leakage_sidd() argument
586 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_bapm_vddc_base_leakage_sidd()
588 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_bapm_vddc_base_leakage_sidd()
604 static int polaris10_populate_pm_fuses(struct pp_hwmgr *hwmgr) in polaris10_populate_pm_fuses() argument
606 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_pm_fuses()
609 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_populate_pm_fuses()
611 if (smu7_read_smc_sram_dword(hwmgr, in polaris10_populate_pm_fuses()
619 if (polaris10_populate_svi_load_line(hwmgr)) in polaris10_populate_pm_fuses()
624 if (polaris10_populate_tdc_limit(hwmgr)) in polaris10_populate_pm_fuses()
628 if (polaris10_populate_dw8(hwmgr, pm_fuse_table_offset)) in polaris10_populate_pm_fuses()
634 if (0 != polaris10_populate_temperature_scaler(hwmgr)) in polaris10_populate_pm_fuses()
639 if (polaris10_populate_fuzzy_fan(hwmgr)) in polaris10_populate_pm_fuses()
644 if (polaris10_populate_gnb_lpml(hwmgr)) in polaris10_populate_pm_fuses()
649 if (polaris10_populate_bapm_vddc_base_leakage_sidd(hwmgr)) in polaris10_populate_pm_fuses()
654 if (smu7_copy_bytes_to_smc(hwmgr, pm_fuse_table_offset, in polaris10_populate_pm_fuses()
664 static int polaris10_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_mvdd_table() argument
667 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_mvdd_table()
691 static int polaris10_populate_smc_vddc_table(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_vddc_table() argument
695 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_vddc_table()
716 static int polaris10_populate_smc_vddci_table(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_vddci_table() argument
720 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_vddci_table()
741 static int polaris10_populate_cac_table(struct pp_hwmgr *hwmgr, in polaris10_populate_cac_table() argument
746 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_cac_table()
748 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_cac_table()
767 static int polaris10_populate_smc_voltage_tables(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_voltage_tables() argument
770 polaris10_populate_smc_vddc_table(hwmgr, table); in polaris10_populate_smc_voltage_tables()
771 polaris10_populate_smc_vddci_table(hwmgr, table); in polaris10_populate_smc_voltage_tables()
772 polaris10_populate_smc_mvdd_table(hwmgr, table); in polaris10_populate_smc_voltage_tables()
773 polaris10_populate_cac_table(hwmgr, table); in polaris10_populate_smc_voltage_tables()
778 static int polaris10_populate_ulv_level(struct pp_hwmgr *hwmgr, in polaris10_populate_ulv_level() argument
781 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_ulv_level()
783 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_ulv_level()
784 struct amdgpu_device *adev = hwmgr->adev; in polaris10_populate_ulv_level()
793 if ((hwmgr->chip_id == CHIP_POLARIS12) || in polaris10_populate_ulv_level()
809 static int polaris10_populate_ulv_state(struct pp_hwmgr *hwmgr, in polaris10_populate_ulv_state() argument
812 return polaris10_populate_ulv_level(hwmgr, &table->Ulv); in polaris10_populate_ulv_state()
815 static int polaris10_populate_smc_link_level(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_link_level() argument
818 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_link_level()
819 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_smc_link_level()
847 static void polaris10_get_sclk_range_table(struct pp_hwmgr *hwmgr, in polaris10_get_sclk_range_table() argument
850 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_get_sclk_range_table()
855 ref_clk = amdgpu_asic_get_xclk((struct amdgpu_device *)hwmgr->adev); in polaris10_get_sclk_range_table()
857 if (0 == atomctrl_get_smc_sclk_range_table(hwmgr, &range_table_from_vbios)) { in polaris10_get_sclk_range_table()
890 static int polaris10_calculate_sclk_params(struct pp_hwmgr *hwmgr, in polaris10_calculate_sclk_params() argument
893 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_calculate_sclk_params()
904 result = atomctrl_get_engine_pll_dividers_ai(hwmgr, clock, ÷rs); in polaris10_calculate_sclk_params()
920 ref_clock = amdgpu_asic_get_xclk((struct amdgpu_device *)hwmgr->adev); in polaris10_calculate_sclk_params()
955 static int polaris10_populate_single_graphic_level(struct pp_hwmgr *hwmgr, in polaris10_populate_single_graphic_level() argument
961 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_single_graphic_level()
963 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_single_graphic_level()
967 result = polaris10_calculate_sclk_params(hwmgr, clock, &curr_sclk_setting); in polaris10_populate_single_graphic_level()
969 if (hwmgr->od_enabled) in polaris10_populate_single_graphic_level()
975 result = polaris10_get_dependency_volt_by_clk(hwmgr, in polaris10_populate_single_graphic_level()
993 data->display_timing.min_clock_in_sr = hwmgr->display_config->min_core_set_clock_in_sr; in polaris10_populate_single_graphic_level()
995 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_SclkDeepSleep)) in polaris10_populate_single_graphic_level()
997 hwmgr->display_config->min_core_set_clock_in_sr); in polaris10_populate_single_graphic_level()
1026 static void polaris10_get_vddc_shared_railinfo(struct pp_hwmgr *hwmgr) in polaris10_get_vddc_shared_railinfo() argument
1028 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_get_vddc_shared_railinfo()
1032 if (!atomctrl_get_vddc_shared_railinfo(hwmgr, &shared_rail)) in polaris10_get_vddc_shared_railinfo()
1036 static int polaris10_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) in polaris10_populate_all_graphic_levels() argument
1038 struct smu7_hwmgr *hw_data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_all_graphic_levels()
1039 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_all_graphic_levels()
1042 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_all_graphic_levels()
1057 struct amdgpu_device *adev = hwmgr->adev; in polaris10_populate_all_graphic_levels()
1063 polaris10_get_vddc_shared_railinfo(hwmgr); in polaris10_populate_all_graphic_levels()
1065 polaris10_get_sclk_range_table(hwmgr, &(smu_data->smc_state_table)); in polaris10_populate_all_graphic_levels()
1069 result = polaris10_populate_single_graphic_level(hwmgr, in polaris10_populate_all_graphic_levels()
1079 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_populate_all_graphic_levels()
1083 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in polaris10_populate_all_graphic_levels()
1089 smum_send_msg_to_smc_with_parameter(hwmgr, in polaris10_populate_all_graphic_levels()
1146 result = smu7_copy_bytes_to_smc(hwmgr, array, (uint8_t *)levels, in polaris10_populate_all_graphic_levels()
1153 static int polaris10_populate_single_memory_level(struct pp_hwmgr *hwmgr, in polaris10_populate_single_memory_level() argument
1156 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_single_memory_level()
1158 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_single_memory_level()
1164 if (hwmgr->od_enabled) in polaris10_populate_single_memory_level()
1170 result = polaris10_get_dependency_volt_by_clk(hwmgr, in polaris10_populate_single_memory_level()
1188 data->display_timing.num_existing_displays = hwmgr->display_config->num_display; in polaris10_populate_single_memory_level()
1189 data->display_timing.vrefresh = hwmgr->display_config->vrefresh; in polaris10_populate_single_memory_level()
1193 (PHM_READ_FIELD(hwmgr->device, DPG_PIPE_STUTTER_CONTROL, in polaris10_populate_single_memory_level()
1208 static int polaris10_populate_all_memory_levels(struct pp_hwmgr *hwmgr) in polaris10_populate_all_memory_levels() argument
1210 struct smu7_hwmgr *hw_data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_all_memory_levels()
1211 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_all_memory_levels()
1227 result = polaris10_populate_single_memory_level(hwmgr, in polaris10_populate_all_memory_levels()
1246 result = smu7_copy_bytes_to_smc(hwmgr, array, (uint8_t *)levels, in polaris10_populate_all_memory_levels()
1252 static int polaris10_populate_mvdd_value(struct pp_hwmgr *hwmgr, in polaris10_populate_mvdd_value() argument
1255 const struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_mvdd_value()
1257 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_mvdd_value()
1277 static int polaris10_populate_smc_acpi_level(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_acpi_level() argument
1282 const struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_acpi_level()
1284 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_smc_acpi_level()
1293 result = polaris10_get_dependency_volt_by_clk(hwmgr, in polaris10_populate_smc_acpi_level()
1302 result = polaris10_calculate_sclk_params(hwmgr, sclk_frequency, &(table->ACPILevel.SclkSetting)); in polaris10_populate_smc_acpi_level()
1328 result = polaris10_get_dependency_volt_by_clk(hwmgr, in polaris10_populate_smc_acpi_level()
1339 polaris10_populate_mvdd_value(hwmgr, in polaris10_populate_smc_acpi_level()
1343 if (0 == polaris10_populate_mvdd_value(hwmgr, 0, &vol_level)) in polaris10_populate_smc_acpi_level()
1365 static int polaris10_populate_smc_vce_level(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_vce_level() argument
1372 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_smc_vce_level()
1375 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_vce_level()
1401 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in polaris10_populate_smc_vce_level()
1415 static int polaris10_populate_smc_samu_level(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_samu_level() argument
1422 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_smc_samu_level()
1425 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_samu_level()
1450 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in polaris10_populate_smc_samu_level()
1464 static int polaris10_populate_memory_timing_parameters(struct pp_hwmgr *hwmgr, in polaris10_populate_memory_timing_parameters() argument
1473 result = atomctrl_set_engine_dram_timings_rv770(hwmgr, in polaris10_populate_memory_timing_parameters()
1478 dram_timing = cgs_read_register(hwmgr->device, mmMC_ARB_DRAM_TIMING); in polaris10_populate_memory_timing_parameters()
1479 dram_timing2 = cgs_read_register(hwmgr->device, mmMC_ARB_DRAM_TIMING2); in polaris10_populate_memory_timing_parameters()
1480 burst_time = PHM_READ_FIELD(hwmgr->device, MC_ARB_BURST_TIME, STATE0); in polaris10_populate_memory_timing_parameters()
1490 static int polaris10_program_memory_timing_parameters(struct pp_hwmgr *hwmgr) in polaris10_program_memory_timing_parameters() argument
1492 struct smu7_hwmgr *hw_data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_program_memory_timing_parameters()
1493 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_program_memory_timing_parameters()
1500 result = polaris10_populate_memory_timing_parameters(hwmgr, in polaris10_program_memory_timing_parameters()
1505 result = atomctrl_set_ac_timing_ai(hwmgr, hw_data->dpm_table.mclk_table.dpm_levels[j].value, j); in polaris10_program_memory_timing_parameters()
1512 hwmgr, in polaris10_program_memory_timing_parameters()
1520 static int polaris10_populate_smc_uvd_level(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_uvd_level() argument
1527 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_smc_uvd_level()
1530 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_uvd_level()
1555 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in polaris10_populate_smc_uvd_level()
1562 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, in polaris10_populate_smc_uvd_level()
1577 static int polaris10_populate_smc_boot_level(struct pp_hwmgr *hwmgr, in polaris10_populate_smc_boot_level() argument
1581 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_boot_level()
1617 static int polaris10_populate_smc_initailial_state(struct pp_hwmgr *hwmgr) in polaris10_populate_smc_initailial_state() argument
1619 struct smu7_hwmgr *hw_data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_smc_initailial_state()
1620 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_smc_initailial_state()
1622 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_smc_initailial_state()
1650 static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr) in polaris10_populate_clock_stretcher_data_table() argument
1652 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_clock_stretcher_data_table()
1653 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_clock_stretcher_data_table()
1655 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_populate_clock_stretcher_data_table()
1666 atomctrl_read_efuse(hwmgr, STRAP_ASIC_RO_LSB, STRAP_ASIC_RO_MSB, &efuse); in polaris10_populate_clock_stretcher_data_table()
1674 if (hwmgr->chip_id == CHIP_POLARIS10) { in polaris10_populate_clock_stretcher_data_table()
1697 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in polaris10_populate_clock_stretcher_data_table()
1704 value = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixPWR_CKS_CNTL); in polaris10_populate_clock_stretcher_data_table()
1706 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixPWR_CKS_CNTL, value); in polaris10_populate_clock_stretcher_data_table()
1711 static int polaris10_populate_vr_config(struct pp_hwmgr *hwmgr, in polaris10_populate_vr_config() argument
1714 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_vr_config()
1715 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_vr_config()
1749 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, smu_data->smu7_data.soft_regs_start + in polaris10_populate_vr_config()
1758 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, smu_data->smu7_data.soft_regs_start + in polaris10_populate_vr_config()
1769 static int polaris10_populate_avfs_parameters(struct pp_hwmgr *hwmgr) in polaris10_populate_avfs_parameters() argument
1771 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_populate_avfs_parameters()
1772 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_populate_avfs_parameters()
1773 struct amdgpu_device *adev = hwmgr->adev; in polaris10_populate_avfs_parameters()
1783 (struct phm_ppt_v1_information *)hwmgr->pptable; in polaris10_populate_avfs_parameters()
1788 if (!hwmgr->avfs_supported) in polaris10_populate_avfs_parameters()
1793 hwmgr->avfs_supported = 0; in polaris10_populate_avfs_parameters()
1797 result = atomctrl_get_avfs_information(hwmgr, &avfs_params); in polaris10_populate_avfs_parameters()
1801 …((hwmgr->chip_id == CHIP_POLARIS12) && !ASICID_IS_P23(adev->pdev->device, adev->pdev->revision)) || in polaris10_populate_avfs_parameters()
1819 …} else if (hwmgr->chip_id == CHIP_POLARIS12 && !ASICID_IS_P23(adev->pdev->device, adev->pdev->revi… in polaris10_populate_avfs_parameters()
1868 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_populate_avfs_parameters()
1872 smu7_copy_bytes_to_smc(hwmgr, in polaris10_populate_avfs_parameters()
1878 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_populate_avfs_parameters()
1881 smu7_copy_bytes_to_smc(hwmgr, in polaris10_populate_avfs_parameters()
1896 static void polaris10_initialize_power_tune_defaults(struct pp_hwmgr *hwmgr) in polaris10_initialize_power_tune_defaults() argument
1898 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_initialize_power_tune_defaults()
1900 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_initialize_power_tune_defaults()
1913 static int polaris10_init_smc_table(struct pp_hwmgr *hwmgr) in polaris10_init_smc_table() argument
1916 struct smu7_hwmgr *hw_data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_init_smc_table()
1917 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_init_smc_table()
1920 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_init_smc_table()
1927 polaris10_initialize_power_tune_defaults(hwmgr); in polaris10_init_smc_table()
1930 polaris10_populate_smc_voltage_tables(hwmgr, table); in polaris10_init_smc_table()
1933 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
1937 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
1945 result = polaris10_populate_ulv_state(hwmgr, table); in polaris10_init_smc_table()
1948 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in polaris10_init_smc_table()
1952 result = polaris10_populate_smc_link_level(hwmgr, table); in polaris10_init_smc_table()
1956 result = polaris10_populate_all_graphic_levels(hwmgr); in polaris10_init_smc_table()
1960 result = polaris10_populate_all_memory_levels(hwmgr); in polaris10_init_smc_table()
1964 result = polaris10_populate_smc_acpi_level(hwmgr, table); in polaris10_init_smc_table()
1968 result = polaris10_populate_smc_vce_level(hwmgr, table); in polaris10_init_smc_table()
1972 result = polaris10_populate_smc_samu_level(hwmgr, table); in polaris10_init_smc_table()
1980 result = polaris10_program_memory_timing_parameters(hwmgr); in polaris10_init_smc_table()
1984 result = polaris10_populate_smc_uvd_level(hwmgr, table); in polaris10_init_smc_table()
1988 result = polaris10_populate_smc_boot_level(hwmgr, table); in polaris10_init_smc_table()
1992 result = polaris10_populate_smc_initailial_state(hwmgr); in polaris10_init_smc_table()
1996 result = polaris10_populate_bapm_parameters_in_dpm_table(hwmgr); in polaris10_init_smc_table()
2000 polaris10_populate_zero_rpm_parameters(hwmgr); in polaris10_init_smc_table()
2002 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
2004 result = polaris10_populate_clock_stretcher_data_table(hwmgr); in polaris10_init_smc_table()
2010 result = polaris10_populate_avfs_parameters(hwmgr); in polaris10_init_smc_table()
2034 result = polaris10_populate_vr_config(hwmgr, table); in polaris10_init_smc_table()
2041 if (atomctrl_get_pp_assign_pin(hwmgr, VDDC_VRHOT_GPIO_PINID, &gpio_pin)) { in polaris10_init_smc_table()
2047 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
2051 if (atomctrl_get_pp_assign_pin(hwmgr, PP_AC_DC_SWITCH_GPIO_PINID, in polaris10_init_smc_table()
2054 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
2056 !smum_send_msg_to_smc(hwmgr, PPSMC_MSG_UseNewGPIOScheme, NULL)) in polaris10_init_smc_table()
2057 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
2061 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
2066 if (atomctrl_get_pp_assign_pin(hwmgr, THERMAL_INT_OUTPUT_GPIO_PINID, in polaris10_init_smc_table()
2068 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in polaris10_init_smc_table()
2078 table->ThermOutPolarity = (0 == (cgs_read_register(hwmgr->device, mmGPIOPAD_A) in polaris10_init_smc_table()
2083 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_RegulatorHot) in polaris10_init_smc_table()
2084 …&& phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_CombinePCCWithThermal… in polaris10_init_smc_table()
2094 result = atomctrl_get_dfs_pll_dividers_vi(hwmgr, smu_data->bif_sclk_table[i], ÷rs); in polaris10_init_smc_table()
2118 result = smu7_copy_bytes_to_smc(hwmgr, in polaris10_init_smc_table()
2127 result = polaris10_populate_pm_fuses(hwmgr); in polaris10_init_smc_table()
2134 static int polaris10_program_mem_timing_parameters(struct pp_hwmgr *hwmgr) in polaris10_program_mem_timing_parameters() argument
2136 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_program_mem_timing_parameters()
2140 return polaris10_program_memory_timing_parameters(hwmgr); in polaris10_program_mem_timing_parameters()
2145 static int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr) in polaris10_thermal_avfs_enable() argument
2147 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_thermal_avfs_enable()
2149 if (!hwmgr->avfs_supported) in polaris10_thermal_avfs_enable()
2152 smum_send_msg_to_smc_with_parameter(hwmgr, in polaris10_thermal_avfs_enable()
2156 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_EnableAvfs, NULL); in polaris10_thermal_avfs_enable()
2162 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_ApplyAvfsCksOffVoltage, NULL); in polaris10_thermal_avfs_enable()
2167 static int polaris10_thermal_setup_fan_table(struct pp_hwmgr *hwmgr) in polaris10_thermal_setup_fan_table() argument
2169 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_thermal_setup_fan_table()
2178 if (hwmgr->thermal_controller.fanInfo.bNoFan) { in polaris10_thermal_setup_fan_table()
2179 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in polaris10_thermal_setup_fan_table()
2185 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in polaris10_thermal_setup_fan_table()
2190 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_thermal_setup_fan_table()
2194 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in polaris10_thermal_setup_fan_table()
2200 if (hwmgr->thermal_controller.use_hw_fan_control) in polaris10_thermal_setup_fan_table()
2203 tmp64 = hwmgr->thermal_controller.advanceFanControlParameters. in polaris10_thermal_setup_fan_table()
2208 t_diff1 = hwmgr->thermal_controller.advanceFanControlParameters.usTMed - in polaris10_thermal_setup_fan_table()
2209 hwmgr->thermal_controller.advanceFanControlParameters.usTMin; in polaris10_thermal_setup_fan_table()
2210 t_diff2 = hwmgr->thermal_controller.advanceFanControlParameters.usTHigh - in polaris10_thermal_setup_fan_table()
2211 hwmgr->thermal_controller.advanceFanControlParameters.usTMed; in polaris10_thermal_setup_fan_table()
2213 pwm_diff1 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMMed - in polaris10_thermal_setup_fan_table()
2214 hwmgr->thermal_controller.advanceFanControlParameters.usPWMMin; in polaris10_thermal_setup_fan_table()
2215 pwm_diff2 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMHigh - in polaris10_thermal_setup_fan_table()
2216 hwmgr->thermal_controller.advanceFanControlParameters.usPWMMed; in polaris10_thermal_setup_fan_table()
2221 fan_table.TempMin = cpu_to_be16((50 + hwmgr-> in polaris10_thermal_setup_fan_table()
2223 fan_table.TempMed = cpu_to_be16((50 + hwmgr-> in polaris10_thermal_setup_fan_table()
2225 fan_table.TempMax = cpu_to_be16((50 + hwmgr-> in polaris10_thermal_setup_fan_table()
2233 fan_table.HystDown = cpu_to_be16(hwmgr-> in polaris10_thermal_setup_fan_table()
2242 reference_clock = amdgpu_asic_get_xclk((struct amdgpu_device *)hwmgr->adev); in polaris10_thermal_setup_fan_table()
2244 fan_table.RefreshPeriod = cpu_to_be32((hwmgr-> in polaris10_thermal_setup_fan_table()
2251 hwmgr->device, CGS_IND_REG__SMC, in polaris10_thermal_setup_fan_table()
2254 res = smu7_copy_bytes_to_smc(hwmgr, smu_data->smu7_data.fan_table_start, in polaris10_thermal_setup_fan_table()
2258 if (!res && hwmgr->thermal_controller. in polaris10_thermal_setup_fan_table()
2260 res = smum_send_msg_to_smc_with_parameter(hwmgr, in polaris10_thermal_setup_fan_table()
2262 hwmgr->thermal_controller. in polaris10_thermal_setup_fan_table()
2266 if (!res && hwmgr->thermal_controller. in polaris10_thermal_setup_fan_table()
2268 res = smum_send_msg_to_smc_with_parameter(hwmgr, in polaris10_thermal_setup_fan_table()
2270 hwmgr->thermal_controller. in polaris10_thermal_setup_fan_table()
2275 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in polaris10_thermal_setup_fan_table()
2281 static int polaris10_update_uvd_smc_table(struct pp_hwmgr *hwmgr) in polaris10_update_uvd_smc_table() argument
2283 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_update_uvd_smc_table()
2286 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_update_uvd_smc_table()
2296 mm_boot_level_value = cgs_read_ind_register(hwmgr->device, in polaris10_update_uvd_smc_table()
2300 cgs_write_ind_register(hwmgr->device, in polaris10_update_uvd_smc_table()
2303 if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_update_uvd_smc_table()
2305 phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_update_uvd_smc_table()
2307 smum_send_msg_to_smc_with_parameter(hwmgr, in polaris10_update_uvd_smc_table()
2314 static int polaris10_update_vce_smc_table(struct pp_hwmgr *hwmgr) in polaris10_update_vce_smc_table() argument
2316 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_update_vce_smc_table()
2319 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_update_vce_smc_table()
2321 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_update_vce_smc_table()
2332 mm_boot_level_value = cgs_read_ind_register(hwmgr->device, in polaris10_update_vce_smc_table()
2336 cgs_write_ind_register(hwmgr->device, in polaris10_update_vce_smc_table()
2339 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_StablePState)) in polaris10_update_vce_smc_table()
2340 smum_send_msg_to_smc_with_parameter(hwmgr, in polaris10_update_vce_smc_table()
2347 static int polaris10_update_bif_smc_table(struct pp_hwmgr *hwmgr) in polaris10_update_bif_smc_table() argument
2349 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_update_bif_smc_table()
2351 (struct phm_ppt_v1_information *)(hwmgr->pptable); in polaris10_update_bif_smc_table()
2364 static int polaris10_update_smc_table(struct pp_hwmgr *hwmgr, uint32_t type) in polaris10_update_smc_table() argument
2368 polaris10_update_uvd_smc_table(hwmgr); in polaris10_update_smc_table()
2371 polaris10_update_vce_smc_table(hwmgr); in polaris10_update_smc_table()
2374 polaris10_update_bif_smc_table(hwmgr); in polaris10_update_smc_table()
2382 static int polaris10_update_sclk_threshold(struct pp_hwmgr *hwmgr) in polaris10_update_sclk_threshold() argument
2384 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_update_sclk_threshold()
2385 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_update_sclk_threshold()
2390 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, in polaris10_update_sclk_threshold()
2399 hwmgr, in polaris10_update_sclk_threshold()
2410 result = polaris10_program_mem_timing_parameters(hwmgr); in polaris10_update_sclk_threshold()
2492 static int polaris10_process_firmware_header(struct pp_hwmgr *hwmgr) in polaris10_process_firmware_header() argument
2494 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_process_firmware_header()
2495 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_process_firmware_header()
2500 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_process_firmware_header()
2510 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_process_firmware_header()
2522 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_process_firmware_header()
2530 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_process_firmware_header()
2540 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_process_firmware_header()
2550 result = smu7_read_smc_sram_dword(hwmgr, in polaris10_process_firmware_header()
2556 hwmgr->microcode_version_info.SMC = tmp; in polaris10_process_firmware_header()
2563 static uint8_t polaris10_get_memory_modile_index(struct pp_hwmgr *hwmgr) in polaris10_get_memory_modile_index() argument
2565 return (uint8_t) (0xFF & (cgs_read_register(hwmgr->device, mmBIOS_SCRATCH_4) >> 16)); in polaris10_get_memory_modile_index()
2568 static int polaris10_initialize_mc_reg_table(struct pp_hwmgr *hwmgr) in polaris10_initialize_mc_reg_table() argument
2570 struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend); in polaris10_initialize_mc_reg_table()
2572 uint8_t module_index = polaris10_get_memory_modile_index(hwmgr); in polaris10_initialize_mc_reg_table()
2576 return atomctrl_initialize_mc_reg_table_v2_2(hwmgr, module_index, mc_reg_table); in polaris10_initialize_mc_reg_table()
2579 static bool polaris10_is_dpm_running(struct pp_hwmgr *hwmgr) in polaris10_is_dpm_running() argument
2581 return (1 == PHM_READ_INDIRECT_FIELD(hwmgr->device, in polaris10_is_dpm_running()
2586 static int polaris10_update_dpm_settings(struct pp_hwmgr *hwmgr, in polaris10_update_dpm_settings() argument
2589 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); in polaris10_update_dpm_settings()
2591 (hwmgr->smu_backend); in polaris10_update_dpm_settings()
2612 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SCLKDPM_FreezeLevel, NULL); in polaris10_update_dpm_settings()
2621 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in polaris10_update_dpm_settings()
2623 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in polaris10_update_dpm_settings()
2635 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in polaris10_update_dpm_settings()
2638 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in polaris10_update_dpm_settings()
2642 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SCLKDPM_UnfreezeLevel, NULL); in polaris10_update_dpm_settings()
2647 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_MCLKDPM_FreezeLevel, NULL); in polaris10_update_dpm_settings()
2656 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in polaris10_update_dpm_settings()
2658 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in polaris10_update_dpm_settings()
2670 tmp = PP_HOST_TO_SMC_UL(cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset)); in polaris10_update_dpm_settings()
2673 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, offset, PP_HOST_TO_SMC_UL(tmp)); in polaris10_update_dpm_settings()
2677 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_MCLKDPM_UnfreezeLevel, NULL); in polaris10_update_dpm_settings()