Lines Matching refs:hwmgr
32 static int vega20_disable_fan_control_feature(struct pp_hwmgr *hwmgr) in vega20_disable_fan_control_feature() argument
34 struct vega20_hwmgr *data = hwmgr->backend; in vega20_disable_fan_control_feature()
39 hwmgr, false, in vega20_disable_fan_control_feature()
51 int vega20_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr) in vega20_fan_ctrl_stop_smc_fan_control() argument
53 struct vega20_hwmgr *data = hwmgr->backend; in vega20_fan_ctrl_stop_smc_fan_control()
56 return vega20_disable_fan_control_feature(hwmgr); in vega20_fan_ctrl_stop_smc_fan_control()
61 static int vega20_enable_fan_control_feature(struct pp_hwmgr *hwmgr) in vega20_enable_fan_control_feature() argument
63 struct vega20_hwmgr *data = hwmgr->backend; in vega20_enable_fan_control_feature()
68 hwmgr, true, in vega20_enable_fan_control_feature()
80 int vega20_fan_ctrl_start_smc_fan_control(struct pp_hwmgr *hwmgr) in vega20_fan_ctrl_start_smc_fan_control() argument
82 struct vega20_hwmgr *data = hwmgr->backend; in vega20_fan_ctrl_start_smc_fan_control()
85 return vega20_enable_fan_control_feature(hwmgr); in vega20_fan_ctrl_start_smc_fan_control()
90 static int vega20_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode) in vega20_fan_ctrl_set_static_mode() argument
92 struct amdgpu_device *adev = hwmgr->adev; in vega20_fan_ctrl_set_static_mode()
104 static int vega20_get_current_rpm(struct pp_hwmgr *hwmgr, uint32_t *current_rpm) in vega20_get_current_rpm() argument
108 PP_ASSERT_WITH_CODE((ret = smum_send_msg_to_smc(hwmgr, in vega20_get_current_rpm()
117 int vega20_fan_ctrl_get_fan_speed_pwm(struct pp_hwmgr *hwmgr, in vega20_fan_ctrl_get_fan_speed_pwm() argument
120 struct amdgpu_device *adev = hwmgr->adev; in vega20_fan_ctrl_get_fan_speed_pwm()
139 int vega20_fan_ctrl_set_fan_speed_pwm(struct pp_hwmgr *hwmgr, in vega20_fan_ctrl_set_fan_speed_pwm() argument
142 struct amdgpu_device *adev = hwmgr->adev; in vega20_fan_ctrl_set_fan_speed_pwm()
150 vega20_fan_ctrl_stop_smc_fan_control(hwmgr); in vega20_fan_ctrl_set_fan_speed_pwm()
166 return vega20_fan_ctrl_set_static_mode(hwmgr, FDO_PWM_MODE_STATIC); in vega20_fan_ctrl_set_fan_speed_pwm()
169 int vega20_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr, in vega20_fan_ctrl_get_fan_speed_info() argument
181 int vega20_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed) in vega20_fan_ctrl_get_fan_speed_rpm() argument
185 return vega20_get_current_rpm(hwmgr, speed); in vega20_fan_ctrl_get_fan_speed_rpm()
188 int vega20_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed) in vega20_fan_ctrl_set_fan_speed_rpm() argument
190 struct amdgpu_device *adev = hwmgr->adev; in vega20_fan_ctrl_set_fan_speed_rpm()
198 result = vega20_fan_ctrl_stop_smc_fan_control(hwmgr); in vega20_fan_ctrl_set_fan_speed_rpm()
203 crystal_clock_freq = amdgpu_asic_get_xclk((struct amdgpu_device *)hwmgr->adev); in vega20_fan_ctrl_set_fan_speed_rpm()
210 return vega20_fan_ctrl_set_static_mode(hwmgr, FDO_PWM_MODE_STATIC_RPM); in vega20_fan_ctrl_set_fan_speed_rpm()
218 int vega20_thermal_get_temperature(struct pp_hwmgr *hwmgr) in vega20_thermal_get_temperature() argument
220 struct amdgpu_device *adev = hwmgr->adev; in vega20_thermal_get_temperature()
241 static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr, in vega20_thermal_set_temperature_range() argument
245 (struct phm_ppt_v3_information *)hwmgr->pptable; in vega20_thermal_set_temperature_range()
246 struct amdgpu_device *adev = hwmgr->adev; in vega20_thermal_set_temperature_range()
280 static int vega20_thermal_enable_alert(struct pp_hwmgr *hwmgr) in vega20_thermal_enable_alert() argument
282 struct amdgpu_device *adev = hwmgr->adev; in vega20_thermal_enable_alert()
298 int vega20_thermal_disable_alert(struct pp_hwmgr *hwmgr) in vega20_thermal_disable_alert() argument
300 struct amdgpu_device *adev = hwmgr->adev; in vega20_thermal_disable_alert()
312 int vega20_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr) in vega20_thermal_stop_thermal_controller() argument
314 int result = vega20_thermal_disable_alert(hwmgr); in vega20_thermal_stop_thermal_controller()
323 static int vega20_thermal_setup_fan_table(struct pp_hwmgr *hwmgr) in vega20_thermal_setup_fan_table() argument
326 struct vega20_hwmgr *data = (struct vega20_hwmgr *)(hwmgr->backend); in vega20_thermal_setup_fan_table()
329 ret = smum_send_msg_to_smc_with_parameter(hwmgr, in vega20_thermal_setup_fan_table()
337 int vega20_start_thermal_controller(struct pp_hwmgr *hwmgr, in vega20_start_thermal_controller() argument
345 ret = vega20_thermal_set_temperature_range(hwmgr, range); in vega20_start_thermal_controller()
349 ret = vega20_thermal_enable_alert(hwmgr); in vega20_start_thermal_controller()
353 ret = vega20_thermal_setup_fan_table(hwmgr); in vega20_start_thermal_controller()