Lines Matching refs:dpm
74 rdev->pm.dpm.ac_power = true; in radeon_pm_acpi_event_handler()
76 rdev->pm.dpm.ac_power = false; in radeon_pm_acpi_event_handler()
78 if (rdev->asic->dpm.enable_bapm) in radeon_pm_acpi_event_handler()
79 radeon_dpm_enable_bapm(rdev, rdev->pm.dpm.ac_power); in radeon_pm_acpi_event_handler()
459 enum radeon_pm_state_type pm = rdev->pm.dpm.user_state; in radeon_get_dpm_state()
476 rdev->pm.dpm.user_state = POWER_STATE_TYPE_BATTERY; in radeon_set_dpm_state()
478 rdev->pm.dpm.user_state = POWER_STATE_TYPE_BALANCED; in radeon_set_dpm_state()
480 rdev->pm.dpm.user_state = POWER_STATE_TYPE_PERFORMANCE; in radeon_set_dpm_state()
503 enum radeon_dpm_forced_level level = rdev->pm.dpm.forced_level; in radeon_get_dpm_forced_performance_level()
540 if (rdev->asic->dpm.force_performance_level) { in radeon_set_dpm_forced_performance_level()
541 if (rdev->pm.dpm.thermal_active) { in radeon_set_dpm_forced_performance_level()
562 if (rdev->asic->dpm.fan_ctrl_get_mode) in radeon_hwmon_get_pwm1_enable()
563 pwm_mode = rdev->asic->dpm.fan_ctrl_get_mode(rdev); in radeon_hwmon_get_pwm1_enable()
578 if(!rdev->asic->dpm.fan_ctrl_set_mode) in radeon_hwmon_set_pwm1_enable()
587 rdev->asic->dpm.fan_ctrl_set_mode(rdev, FDO_PWM_MODE_STATIC); in radeon_hwmon_set_pwm1_enable()
590 rdev->asic->dpm.fan_ctrl_set_mode(rdev, 0); in radeon_hwmon_set_pwm1_enable()
625 err = rdev->asic->dpm.set_fan_speed_percent(rdev, value); in radeon_hwmon_set_pwm1()
640 err = rdev->asic->dpm.get_fan_speed_percent(rdev, &speed); in radeon_hwmon_get_pwm1()
686 temp = rdev->pm.dpm.thermal.min_temp; in radeon_hwmon_show_temp_thresh()
688 temp = rdev->pm.dpm.thermal.max_temp; in radeon_hwmon_show_temp_thresh()
739 if ((!rdev->asic->dpm.get_fan_speed_percent && in hwmon_attributes_visible()
741 (!rdev->asic->dpm.fan_ctrl_get_mode && in hwmon_attributes_visible()
745 if ((!rdev->asic->dpm.set_fan_speed_percent && in hwmon_attributes_visible()
747 (!rdev->asic->dpm.fan_ctrl_set_mode && in hwmon_attributes_visible()
752 if ((!rdev->asic->dpm.set_fan_speed_percent && in hwmon_attributes_visible()
753 !rdev->asic->dpm.get_fan_speed_percent) && in hwmon_attributes_visible()
812 pm.dpm.thermal.work); in radeon_dpm_thermal_work_handler()
822 if (temp < rdev->pm.dpm.thermal.min_temp) in radeon_dpm_thermal_work_handler()
824 dpm_state = rdev->pm.dpm.user_state; in radeon_dpm_thermal_work_handler()
826 if (rdev->pm.dpm.thermal.high_to_low) in radeon_dpm_thermal_work_handler()
828 dpm_state = rdev->pm.dpm.user_state; in radeon_dpm_thermal_work_handler()
832 rdev->pm.dpm.thermal_active = true; in radeon_dpm_thermal_work_handler()
834 rdev->pm.dpm.thermal_active = false; in radeon_dpm_thermal_work_handler()
835 rdev->pm.dpm.state = dpm_state; in radeon_dpm_thermal_work_handler()
843 bool single_display = (rdev->pm.dpm.new_active_crtc_count < 2) ? in radeon_dpm_single_display()
847 if (single_display && rdev->asic->dpm.vblank_too_short) { in radeon_dpm_single_display()
880 for (i = 0; i < rdev->pm.dpm.num_ps; i++) { in radeon_dpm_pick_power_state()
881 ps = &rdev->pm.dpm.ps[i]; in radeon_dpm_pick_power_state()
914 if (rdev->pm.dpm.uvd_ps) in radeon_dpm_pick_power_state()
915 return rdev->pm.dpm.uvd_ps; in radeon_dpm_pick_power_state()
935 return rdev->pm.dpm.boot_ps; in radeon_dpm_pick_power_state()
964 if (rdev->pm.dpm.uvd_ps) { in radeon_dpm_pick_power_state()
965 return rdev->pm.dpm.uvd_ps; in radeon_dpm_pick_power_state()
1000 if (rdev->pm.dpm.user_state != rdev->pm.dpm.state) { in radeon_dpm_change_power_state_locked()
1002 if ((!rdev->pm.dpm.thermal_active) && in radeon_dpm_change_power_state_locked()
1003 (!rdev->pm.dpm.uvd_active)) in radeon_dpm_change_power_state_locked()
1004 rdev->pm.dpm.state = rdev->pm.dpm.user_state; in radeon_dpm_change_power_state_locked()
1006 dpm_state = rdev->pm.dpm.state; in radeon_dpm_change_power_state_locked()
1010 rdev->pm.dpm.requested_ps = ps; in radeon_dpm_change_power_state_locked()
1015 if (rdev->pm.dpm.current_ps == rdev->pm.dpm.requested_ps) { in radeon_dpm_change_power_state_locked()
1017 if (ps->vce_active != rdev->pm.dpm.vce_active) in radeon_dpm_change_power_state_locked()
1020 if (rdev->pm.dpm.single_display != single_display) in radeon_dpm_change_power_state_locked()
1026 if (rdev->pm.dpm.new_active_crtcs != rdev->pm.dpm.current_active_crtcs) { in radeon_dpm_change_power_state_locked()
1031 rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs; in radeon_dpm_change_power_state_locked()
1032 rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count; in radeon_dpm_change_power_state_locked()
1040 if (rdev->pm.dpm.new_active_crtcs == in radeon_dpm_change_power_state_locked()
1041 rdev->pm.dpm.current_active_crtcs) { in radeon_dpm_change_power_state_locked()
1044 if ((rdev->pm.dpm.current_active_crtc_count > 1) && in radeon_dpm_change_power_state_locked()
1045 (rdev->pm.dpm.new_active_crtc_count > 1)) { in radeon_dpm_change_power_state_locked()
1050 rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs; in radeon_dpm_change_power_state_locked()
1051 rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count; in radeon_dpm_change_power_state_locked()
1061 radeon_dpm_print_power_state(rdev, rdev->pm.dpm.current_ps); in radeon_dpm_change_power_state_locked()
1063 radeon_dpm_print_power_state(rdev, rdev->pm.dpm.requested_ps); in radeon_dpm_change_power_state_locked()
1070 ps->vce_active = rdev->pm.dpm.vce_active; in radeon_dpm_change_power_state_locked()
1092 rdev->pm.dpm.current_ps = rdev->pm.dpm.requested_ps; in radeon_dpm_change_power_state_locked()
1096 rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs; in radeon_dpm_change_power_state_locked()
1097 rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count; in radeon_dpm_change_power_state_locked()
1098 rdev->pm.dpm.single_display = single_display; in radeon_dpm_change_power_state_locked()
1100 if (rdev->asic->dpm.force_performance_level) { in radeon_dpm_change_power_state_locked()
1101 if (rdev->pm.dpm.thermal_active) { in radeon_dpm_change_power_state_locked()
1102 enum radeon_dpm_forced_level level = rdev->pm.dpm.forced_level; in radeon_dpm_change_power_state_locked()
1106 rdev->pm.dpm.forced_level = level; in radeon_dpm_change_power_state_locked()
1109 radeon_dpm_force_performance_level(rdev, rdev->pm.dpm.forced_level); in radeon_dpm_change_power_state_locked()
1122 if (rdev->asic->dpm.powergate_uvd) { in radeon_dpm_enable_uvd()
1126 enable |= rdev->pm.dpm.sd > 0; in radeon_dpm_enable_uvd()
1127 enable |= rdev->pm.dpm.hd > 0; in radeon_dpm_enable_uvd()
1134 rdev->pm.dpm.uvd_active = true; in radeon_dpm_enable_uvd()
1137 if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0)) in radeon_dpm_enable_uvd()
1139 else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0)) in radeon_dpm_enable_uvd()
1141 else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 1)) in radeon_dpm_enable_uvd()
1143 else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2)) in radeon_dpm_enable_uvd()
1148 rdev->pm.dpm.state = dpm_state; in radeon_dpm_enable_uvd()
1152 rdev->pm.dpm.uvd_active = false; in radeon_dpm_enable_uvd()
1164 rdev->pm.dpm.vce_active = true; in radeon_dpm_enable_vce()
1166 rdev->pm.dpm.vce_level = RADEON_VCE_LEVEL_AC_ALL; in radeon_dpm_enable_vce()
1170 rdev->pm.dpm.vce_active = false; in radeon_dpm_enable_vce()
1195 rdev->pm.dpm.current_ps = rdev->pm.dpm.requested_ps = rdev->pm.dpm.boot_ps; in radeon_pm_suspend_dpm()
1251 rdev->pm.dpm.current_ps = rdev->pm.dpm.requested_ps = rdev->pm.dpm.boot_ps; in radeon_pm_resume_dpm()
1347 for (i = 0; i < rdev->pm.dpm.num_ps; i++) { in radeon_dpm_print_power_states()
1349 radeon_dpm_print_power_state(rdev, &rdev->pm.dpm.ps[i]); in radeon_dpm_print_power_states()
1358 rdev->pm.dpm.state = POWER_STATE_TYPE_BALANCED; in radeon_pm_init_dpm()
1359 rdev->pm.dpm.user_state = POWER_STATE_TYPE_BALANCED; in radeon_pm_init_dpm()
1360 rdev->pm.dpm.forced_level = RADEON_DPM_FORCED_LEVEL_AUTO; in radeon_pm_init_dpm()
1377 INIT_WORK(&rdev->pm.dpm.thermal.work, radeon_dpm_thermal_work_handler); in radeon_pm_init_dpm()
1380 rdev->pm.dpm.current_ps = rdev->pm.dpm.requested_ps = rdev->pm.dpm.boot_ps; in radeon_pm_init_dpm()
1716 rdev->pm.dpm.new_active_crtcs = 0; in radeon_pm_compute_clocks_dpm()
1717 rdev->pm.dpm.new_active_crtc_count = 0; in radeon_pm_compute_clocks_dpm()
1723 rdev->pm.dpm.new_active_crtcs |= (1 << radeon_crtc->crtc_id); in radeon_pm_compute_clocks_dpm()
1724 rdev->pm.dpm.new_active_crtc_count++; in radeon_pm_compute_clocks_dpm()
1731 rdev->pm.dpm.ac_power = true; in radeon_pm_compute_clocks_dpm()
1733 rdev->pm.dpm.ac_power = false; in radeon_pm_compute_clocks_dpm()
1862 if (rdev->asic->dpm.debugfs_print_current_performance_level) in radeon_debugfs_pm_info()