Lines Matching full:pi

44 	struct igp_power_info *pi = rdev->pm.dpm.priv;  in rs780_get_pi()  local
46 return pi; in rs780_get_pi()
51 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_get_pm_mode_parameters() local
58 pi->crtc_id = 0; in rs780_get_pm_mode_parameters()
59 pi->refresh_rate = 60; in rs780_get_pm_mode_parameters()
65 pi->crtc_id = radeon_crtc->crtc_id; in rs780_get_pm_mode_parameters()
67 pi->refresh_rate = drm_mode_vrefresh(&crtc->mode); in rs780_get_pm_mode_parameters()
225 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_voltage_scaling_init() local
244 if (pi->pwm_voltage_control) { in rs780_voltage_scaling_init()
245 fv_throt_pwm_range[0] = pi->min_voltage; in rs780_voltage_scaling_init()
246 fv_throt_pwm_range[1] = pi->min_voltage; in rs780_voltage_scaling_init()
247 fv_throt_pwm_range[2] = pi->max_voltage; in rs780_voltage_scaling_init()
248 fv_throt_pwm_range[3] = pi->max_voltage; in rs780_voltage_scaling_init()
250 fv_throt_pwm_range[0] = pi->invert_pwm_required ? in rs780_voltage_scaling_init()
252 fv_throt_pwm_range[1] = pi->invert_pwm_required ? in rs780_voltage_scaling_init()
254 fv_throt_pwm_range[2] = pi->invert_pwm_required ? in rs780_voltage_scaling_init()
256 fv_throt_pwm_range[3] = pi->invert_pwm_required ? in rs780_voltage_scaling_init()
261 STARTING_PWM_HIGHTIME(pi->max_voltage), in rs780_voltage_scaling_init()
265 NUMBER_OF_CYCLES_IN_PERIOD(pi->num_of_cycles_in_period), in rs780_voltage_scaling_init()
271 if (pi->invert_pwm_required) in rs780_voltage_scaling_init()
279 (MIN_PWM_HIGHTIME(pi->min_voltage) | in rs780_voltage_scaling_init()
280 MAX_PWM_HIGHTIME(pi->max_voltage))); in rs780_voltage_scaling_init()
364 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_program_at() local
366 WREG32(FVTHROT_TARGET_REG, 30000000 / pi->refresh_rate); in rs780_program_at()
367 WREG32(FVTHROT_CB1, 1000000 * 5 / pi->refresh_rate); in rs780_program_at()
368 WREG32(FVTHROT_CB2, 1000000 * 10 / pi->refresh_rate); in rs780_program_at()
369 WREG32(FVTHROT_CB3, 1000000 * 30 / pi->refresh_rate); in rs780_program_at()
370 WREG32(FVTHROT_CB4, 1000000 * 50 / pi->refresh_rate); in rs780_program_at()
479 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_set_engine_clock_spc() local
485 if (pi->crtc_id == 0) in rs780_set_engine_clock_spc()
512 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_get_voltage_for_vddc_level() local
515 return pi->max_voltage; in rs780_get_voltage_for_vddc_level()
517 return pi->min_voltage; in rs780_get_voltage_for_vddc_level()
519 return pi->max_voltage; in rs780_get_voltage_for_vddc_level()
526 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_enable_voltage_scaling() local
549 if (pi->max_voltage != vddc_high) { in rs780_enable_voltage_scaling()
599 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_dpm_enable() local
615 if (pi->voltage_control) in rs780_dpm_enable()
624 if (pi->gfx_clock_gating) in rs780_dpm_enable()
632 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_dpm_disable() local
639 if (pi->gfx_clock_gating) in rs780_dpm_disable()
651 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_dpm_set_power_state() local
660 if (pi->voltage_control) { in rs780_dpm_set_power_state()
661 rs780_force_voltage(rdev, pi->max_voltage); in rs780_dpm_set_power_state()
672 if (pi->voltage_control) in rs780_dpm_set_power_state()
849 struct igp_power_info *pi; in rs780_dpm_init() local
856 pi = kzalloc(sizeof(struct igp_power_info), GFP_KERNEL); in rs780_dpm_init()
857 if (pi == NULL) in rs780_dpm_init()
859 rdev->pm.dpm.priv = pi; in rs780_dpm_init()
869 pi->voltage_control = false; in rs780_dpm_init()
870 pi->gfx_clock_gating = true; in rs780_dpm_init()
879 pi->num_of_cycles_in_period = in rs780_dpm_init()
881 pi->num_of_cycles_in_period |= in rs780_dpm_init()
883 pi->invert_pwm_required = in rs780_dpm_init()
884 (pi->num_of_cycles_in_period & 0x8000) ? true : false; in rs780_dpm_init()
885 pi->boot_voltage = info->info.ucStartingPWM_HighTime; in rs780_dpm_init()
886 pi->max_voltage = info->info.ucMaxNBVoltage; in rs780_dpm_init()
887 pi->max_voltage |= info->info.ucMaxNBVoltageHigh << 8; in rs780_dpm_init()
888 pi->min_voltage = info->info.ucMinNBVoltage; in rs780_dpm_init()
889 pi->min_voltage |= info->info.ucMinNBVoltageHigh << 8; in rs780_dpm_init()
890 pi->inter_voltage_low = in rs780_dpm_init()
892 pi->inter_voltage_high = in rs780_dpm_init()
894 pi->voltage_control = true; in rs780_dpm_init()
895 pi->bootup_uma_clk = info->info.usK8MemoryClock * 100; in rs780_dpm_init()
898 pi->num_of_cycles_in_period = in rs780_dpm_init()
900 pi->invert_pwm_required = in rs780_dpm_init()
901 (pi->num_of_cycles_in_period & 0x8000) ? true : false; in rs780_dpm_init()
902 pi->boot_voltage = in rs780_dpm_init()
904 pi->max_voltage = in rs780_dpm_init()
906 pi->min_voltage = in rs780_dpm_init()
908 pi->system_config = in rs780_dpm_init()
910 pi->pwm_voltage_control = in rs780_dpm_init()
911 (pi->system_config & 0x4) ? true : false; in rs780_dpm_init()
912 pi->voltage_control = true; in rs780_dpm_init()
913 pi->bootup_uma_clk = le32_to_cpu(info->info_2.ulBootUpUMAClock); in rs780_dpm_init()
919 if (pi->min_voltage > pi->max_voltage) in rs780_dpm_init()
920 pi->voltage_control = false; in rs780_dpm_init()
921 if (pi->pwm_voltage_control) { in rs780_dpm_init()
922 if ((pi->num_of_cycles_in_period == 0) || in rs780_dpm_init()
923 (pi->max_voltage == 0) || in rs780_dpm_init()
924 (pi->min_voltage == 0)) in rs780_dpm_init()
925 pi->voltage_control = false; in rs780_dpm_init()
927 if ((pi->num_of_cycles_in_period == 0) || in rs780_dpm_init()
928 (pi->max_voltage == 0)) in rs780_dpm_init()
929 pi->voltage_control = false; in rs780_dpm_init()
976 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_dpm_get_mclk() local
978 return pi->bootup_uma_clk; in rs780_dpm_get_mclk()
1022 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_dpm_get_current_mclk() local
1024 return pi->bootup_uma_clk; in rs780_dpm_get_current_mclk()
1030 struct igp_power_info *pi = rs780_get_pi(rdev); in rs780_dpm_force_performance_level() local
1040 if (pi->voltage_control) in rs780_dpm_force_performance_level()
1041 rs780_force_voltage(rdev, pi->max_voltage); in rs780_dpm_force_performance_level()
1057 if (pi->voltage_control) in rs780_dpm_force_performance_level()
1058 rs780_force_voltage(rdev, pi->min_voltage); in rs780_dpm_force_performance_level()
1060 if (pi->voltage_control) in rs780_dpm_force_performance_level()
1061 rs780_force_voltage(rdev, pi->max_voltage); in rs780_dpm_force_performance_level()
1068 if (pi->voltage_control) { in rs780_dpm_force_performance_level()