Lines Matching full:pi
309 struct trinity_power_info *pi = rdev->pm.dpm.priv; in trinity_get_pi() local
311 return pi; in trinity_get_pi()
316 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_gfx_powergating_initialize() local
344 if (pi->override_dynamic_mgpg && (hw_rev == 0)) in trinity_gfx_powergating_initialize()
499 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_enable_clock_power_gating() local
501 if (pi->enable_gfx_clock_gating) in trinity_enable_clock_power_gating()
503 if (pi->enable_mg_clock_gating) in trinity_enable_clock_power_gating()
505 if (pi->enable_gfx_power_gating) in trinity_enable_clock_power_gating()
507 if (pi->enable_mg_clock_gating) { in trinity_enable_clock_power_gating()
511 if (pi->enable_gfx_clock_gating) in trinity_enable_clock_power_gating()
513 if (pi->enable_gfx_dynamic_mgpg) in trinity_enable_clock_power_gating()
515 if (pi->enable_gfx_power_gating) in trinity_enable_clock_power_gating()
521 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_disable_clock_power_gating() local
523 if (pi->enable_gfx_power_gating) in trinity_disable_clock_power_gating()
525 if (pi->enable_gfx_dynamic_mgpg) in trinity_disable_clock_power_gating()
527 if (pi->enable_gfx_clock_gating) in trinity_disable_clock_power_gating()
529 if (pi->enable_mg_clock_gating) { in trinity_disable_clock_power_gating()
590 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_set_vid() local
591 u32 vid_7bit = sumo_convert_vid2_to_vid7(rdev, &pi->sys_info.vid_mapping_table, vid); in trinity_set_vid()
669 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_program_power_level() local
682 trinity_set_at(rdev, index, pi->at[index]); in trinity_program_power_level()
811 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_program_bootup_state() local
814 trinity_program_power_level(rdev, &pi->boot_pl, 0); in trinity_program_bootup_state()
877 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_setup_uvd_clocks() local
879 if (pi->enable_gfx_power_gating) { in trinity_setup_uvd_clocks()
883 if (pi->uvd_dpm) { in trinity_setup_uvd_clocks()
909 if (pi->enable_gfx_power_gating) { in trinity_setup_uvd_clocks()
959 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_program_ttt() local
963 value |= HT((pi->thermal_auto_throttling + 49) * 8); in trinity_program_ttt()
964 value |= LT((pi->thermal_auto_throttling + 49 - pi->sys_info.htc_hyst_lmt) * 8); in trinity_program_ttt()
1023 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_update_current_ps() local
1025 pi->current_rps = *rps; in trinity_update_current_ps()
1026 pi->current_ps = *new_ps; in trinity_update_current_ps()
1027 pi->current_rps.ps_priv = &pi->current_ps; in trinity_update_current_ps()
1034 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_update_requested_ps() local
1036 pi->requested_rps = *rps; in trinity_update_requested_ps()
1037 pi->requested_ps = *new_ps; in trinity_update_requested_ps()
1038 pi->requested_rps.ps_priv = &pi->requested_ps; in trinity_update_requested_ps()
1043 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_enable_bapm() local
1045 if (pi->enable_bapm) { in trinity_dpm_enable_bapm()
1054 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_enable() local
1066 if (pi->enable_auto_thermal_throttling) { in trinity_dpm_enable()
1129 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_get_min_sclk_divider() local
1131 pi->min_sclk_did = in trinity_get_min_sclk_divider()
1138 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_setup_nbp_sim() local
1142 if (pi->sys_info.nb_dpm_enable) { in trinity_setup_nbp_sim()
1156 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_force_performance_level() local
1157 struct radeon_ps *rps = &pi->current_rps; in trinity_dpm_force_performance_level()
1186 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_pre_set_power_state() local
1193 &pi->requested_rps, in trinity_dpm_pre_set_power_state()
1194 &pi->current_rps); in trinity_dpm_pre_set_power_state()
1201 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_set_power_state() local
1202 struct radeon_ps *new_ps = &pi->requested_rps; in trinity_dpm_set_power_state()
1203 struct radeon_ps *old_ps = &pi->current_rps; in trinity_dpm_set_power_state()
1206 if (pi->enable_dpm) { in trinity_dpm_set_power_state()
1207 if (pi->enable_bapm) in trinity_dpm_set_power_state()
1227 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_post_set_power_state() local
1228 struct radeon_ps *new_ps = &pi->requested_rps; in trinity_dpm_post_set_power_state()
1245 struct trinity_power_info *pi = trinity_get_pi(rdev);
1248 if (pi->enable_dpm) {
1263 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_convert_voltage_index_to_value() local
1264 u32 vid_7bit = sumo_convert_vid2_to_vid7(rdev, &pi->sys_info.vid_mapping_table, vid_2bit); in trinity_convert_voltage_index_to_value()
1278 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_patch_boot_state() local
1283 ps->levels[0] = pi->boot_pl; in trinity_patch_boot_state()
1295 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_construct_boot_state() local
1297 pi->boot_pl.sclk = pi->sys_info.bootup_sclk; in trinity_construct_boot_state()
1298 pi->boot_pl.vddc_index = pi->sys_info.bootup_nb_voltage_index; in trinity_construct_boot_state()
1299 pi->boot_pl.ds_divider_index = 0; in trinity_construct_boot_state()
1300 pi->boot_pl.ss_divider_index = 0; in trinity_construct_boot_state()
1301 pi->boot_pl.allow_gnb_slow = 1; in trinity_construct_boot_state()
1302 pi->boot_pl.force_nbp_state = 0; in trinity_construct_boot_state()
1303 pi->boot_pl.display_wm = 0; in trinity_construct_boot_state()
1304 pi->boot_pl.vce_wm = 0; in trinity_construct_boot_state()
1305 pi->current_ps.num_levels = 1; in trinity_construct_boot_state()
1306 pi->current_ps.levels[0] = pi->boot_pl; in trinity_construct_boot_state()
1312 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_get_sleep_divider_id_from_clock() local
1321 if (!pi->enable_sclk_ds) in trinity_get_sleep_divider_id_from_clock()
1336 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_get_valid_engine_clock() local
1339 for (i = 0; i < pi->sys_info.sclk_voltage_mapping_table.num_max_dpm_entries; i++) { in trinity_get_valid_engine_clock()
1340 if (pi->sys_info.sclk_voltage_mapping_table.entries[i].sclk_frequency >= lower_limit) in trinity_get_valid_engine_clock()
1341 return pi->sys_info.sclk_voltage_mapping_table.entries[i].sclk_frequency; in trinity_get_valid_engine_clock()
1344 if (i == pi->sys_info.sclk_voltage_mapping_table.num_max_dpm_entries) in trinity_get_valid_engine_clock()
1354 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_patch_thermal_state() local
1355 u32 sclk_in_sr = pi->sys_info.min_sclk; /* ??? */ in trinity_patch_thermal_state()
1364 current_vddc = pi->boot_pl.vddc_index; in trinity_patch_thermal_state()
1365 current_sclk = pi->boot_pl.sclk; in trinity_patch_thermal_state()
1406 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_get_uvd_clock_index() local
1410 if ((rps->vclk == pi->sys_info.uvd_clock_table_entries[i].vclk) && in trinity_get_uvd_clock_index()
1411 (rps->dclk == pi->sys_info.uvd_clock_table_entries[i].dclk)) in trinity_get_uvd_clock_index()
1426 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_adjust_uvd_state() local
1430 if (pi->uvd_dpm && r600_is_uvd_state(rps->class, rps->class2)) { in trinity_adjust_uvd_state()
1446 pi->sys_info.uvd_clock_table_entries[high_index].vclk_did; in trinity_adjust_uvd_state()
1448 pi->sys_info.uvd_clock_table_entries[high_index].dclk_did; in trinity_adjust_uvd_state()
1450 pi->sys_info.uvd_clock_table_entries[low_index].vclk_did; in trinity_adjust_uvd_state()
1452 pi->sys_info.uvd_clock_table_entries[low_index].dclk_did; in trinity_adjust_uvd_state()
1492 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_apply_state_adjust_rules() local
1494 u32 min_sclk = pi->sys_info.min_sclk; /* XXX check against disp reqs */ in trinity_apply_state_adjust_rules()
1495 u32 sclk_in_sr = pi->sys_info.min_sclk; /* ??? */ in trinity_apply_state_adjust_rules()
1550 if (pi->sys_info.nb_dpm_enable) { in trinity_apply_state_adjust_rules()
1560 (pi->sys_info.uma_channel_number == 1))); in trinity_apply_state_adjust_rules()
1579 struct trinity_power_info *pi = trinity_get_pi(rdev);
1581 if (pi->voltage_drop_in_dce)
1604 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_display_configuration_changed() local
1606 if (pi->voltage_drop_in_dce) in trinity_dpm_display_configuration_changed()
1663 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_parse_pplib_clock_info() local
1675 if (pi->enable_sclk_ds) { in trinity_parse_pplib_clock_info()
1783 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_convert_did_to_freq() local
1797 return ((pi->sys_info.dentist_vco_freq * 100) + (divider - 1)) / divider; in trinity_convert_did_to_freq()
1802 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_parse_sys_info_table() local
1819 pi->sys_info.bootup_sclk = le32_to_cpu(igp_info->info_7.ulBootUpEngineClock); in trinity_parse_sys_info_table()
1820 pi->sys_info.min_sclk = le32_to_cpu(igp_info->info_7.ulMinEngineClock); in trinity_parse_sys_info_table()
1821 pi->sys_info.bootup_uma_clk = le32_to_cpu(igp_info->info_7.ulBootUpUMAClock); in trinity_parse_sys_info_table()
1822 pi->sys_info.dentist_vco_freq = le32_to_cpu(igp_info->info_7.ulDentistVCOFreq); in trinity_parse_sys_info_table()
1823 pi->sys_info.bootup_nb_voltage_index = in trinity_parse_sys_info_table()
1826 pi->sys_info.htc_tmp_lmt = 203; in trinity_parse_sys_info_table()
1828 pi->sys_info.htc_tmp_lmt = igp_info->info_7.ucHtcTmpLmt; in trinity_parse_sys_info_table()
1830 pi->sys_info.htc_hyst_lmt = 5; in trinity_parse_sys_info_table()
1832 pi->sys_info.htc_hyst_lmt = igp_info->info_7.ucHtcHystLmt; in trinity_parse_sys_info_table()
1833 if (pi->sys_info.htc_tmp_lmt <= pi->sys_info.htc_hyst_lmt) { in trinity_parse_sys_info_table()
1837 if (pi->enable_nbps_policy) in trinity_parse_sys_info_table()
1838 pi->sys_info.nb_dpm_enable = igp_info->info_7.ucNBDPMEnable; in trinity_parse_sys_info_table()
1840 pi->sys_info.nb_dpm_enable = 0; in trinity_parse_sys_info_table()
1843 pi->sys_info.nbp_mclk[i] = le32_to_cpu(igp_info->info_7.ulNbpStateMemclkFreq[i]); in trinity_parse_sys_info_table()
1844 pi->sys_info.nbp_nclk[i] = le32_to_cpu(igp_info->info_7.ulNbpStateNClkFreq[i]); in trinity_parse_sys_info_table()
1847 pi->sys_info.nbp_voltage_index[0] = le16_to_cpu(igp_info->info_7.usNBP0Voltage); in trinity_parse_sys_info_table()
1848 pi->sys_info.nbp_voltage_index[1] = le16_to_cpu(igp_info->info_7.usNBP1Voltage); in trinity_parse_sys_info_table()
1849 pi->sys_info.nbp_voltage_index[2] = le16_to_cpu(igp_info->info_7.usNBP2Voltage); in trinity_parse_sys_info_table()
1850 pi->sys_info.nbp_voltage_index[3] = le16_to_cpu(igp_info->info_7.usNBP3Voltage); in trinity_parse_sys_info_table()
1852 if (!pi->sys_info.nb_dpm_enable) { in trinity_parse_sys_info_table()
1854 pi->sys_info.nbp_mclk[i] = pi->sys_info.nbp_mclk[0]; in trinity_parse_sys_info_table()
1855 pi->sys_info.nbp_nclk[i] = pi->sys_info.nbp_nclk[0]; in trinity_parse_sys_info_table()
1856 pi->sys_info.nbp_voltage_index[i] = pi->sys_info.nbp_voltage_index[0]; in trinity_parse_sys_info_table()
1860 pi->sys_info.uma_channel_number = igp_info->info_7.ucUMAChannelNumber; in trinity_parse_sys_info_table()
1863 &pi->sys_info.sclk_voltage_mapping_table, in trinity_parse_sys_info_table()
1865 sumo_construct_vid_mapping_table(rdev, &pi->sys_info.vid_mapping_table, in trinity_parse_sys_info_table()
1868 pi->sys_info.uvd_clock_table_entries[0].vclk_did = in trinity_parse_sys_info_table()
1870 pi->sys_info.uvd_clock_table_entries[1].vclk_did = in trinity_parse_sys_info_table()
1872 pi->sys_info.uvd_clock_table_entries[2].vclk_did = in trinity_parse_sys_info_table()
1874 pi->sys_info.uvd_clock_table_entries[3].vclk_did = in trinity_parse_sys_info_table()
1877 pi->sys_info.uvd_clock_table_entries[0].dclk_did = in trinity_parse_sys_info_table()
1879 pi->sys_info.uvd_clock_table_entries[1].dclk_did = in trinity_parse_sys_info_table()
1881 pi->sys_info.uvd_clock_table_entries[2].dclk_did = in trinity_parse_sys_info_table()
1883 pi->sys_info.uvd_clock_table_entries[3].dclk_did = in trinity_parse_sys_info_table()
1887 pi->sys_info.uvd_clock_table_entries[i].vclk = in trinity_parse_sys_info_table()
1889 pi->sys_info.uvd_clock_table_entries[i].vclk_did); in trinity_parse_sys_info_table()
1890 pi->sys_info.uvd_clock_table_entries[i].dclk = in trinity_parse_sys_info_table()
1892 pi->sys_info.uvd_clock_table_entries[i].dclk_did); in trinity_parse_sys_info_table()
1903 struct trinity_power_info *pi; in trinity_dpm_init() local
1906 pi = kzalloc(sizeof(struct trinity_power_info), GFP_KERNEL); in trinity_dpm_init()
1907 if (pi == NULL) in trinity_dpm_init()
1909 rdev->pm.dpm.priv = pi; in trinity_dpm_init()
1912 pi->at[i] = TRINITY_AT_DFLT; in trinity_dpm_init()
1922 pi->enable_bapm = true; in trinity_dpm_init()
1924 pi->enable_bapm = false; in trinity_dpm_init()
1926 pi->enable_bapm = false; in trinity_dpm_init()
1928 pi->enable_bapm = true; in trinity_dpm_init()
1930 pi->enable_nbps_policy = true; in trinity_dpm_init()
1931 pi->enable_sclk_ds = true; in trinity_dpm_init()
1932 pi->enable_gfx_power_gating = true; in trinity_dpm_init()
1933 pi->enable_gfx_clock_gating = true; in trinity_dpm_init()
1934 pi->enable_mg_clock_gating = false; in trinity_dpm_init()
1935 pi->enable_gfx_dynamic_mgpg = false; in trinity_dpm_init()
1936 pi->override_dynamic_mgpg = false; in trinity_dpm_init()
1937 pi->enable_auto_thermal_throttling = true; in trinity_dpm_init()
1938 pi->voltage_drop_in_dce = false; /* need to restructure dpm/modeset interaction */ in trinity_dpm_init()
1939 pi->uvd_dpm = true; /* ??? */ in trinity_dpm_init()
1959 pi->thermal_auto_throttling = pi->sys_info.htc_tmp_lmt; in trinity_dpm_init()
1960 pi->enable_dpm = true; in trinity_dpm_init()
1986 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_debugfs_print_current_performance_level() local
1987 struct radeon_ps *rps = &pi->current_rps; in trinity_dpm_debugfs_print_current_performance_level()
2007 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_get_current_sclk() local
2008 struct radeon_ps *rps = &pi->current_rps; in trinity_dpm_get_current_sclk()
2025 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_get_current_mclk() local
2027 return pi->sys_info.bootup_uma_clk; in trinity_dpm_get_current_mclk()
2046 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_get_sclk() local
2047 struct trinity_ps *requested_state = trinity_get_ps(&pi->requested_rps); in trinity_dpm_get_sclk()
2057 struct trinity_power_info *pi = trinity_get_pi(rdev); in trinity_dpm_get_mclk() local
2059 return pi->sys_info.bootup_uma_clk; in trinity_dpm_get_mclk()