Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2016 Advanced Micro Devices, Inc.
0003  *
0004  * Permission is hereby granted, free of charge, to any person obtaining a
0005  * copy of this software and associated documentation files (the "Software"),
0006  * to deal in the Software without restriction, including without limitation
0007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0008  * and/or sell copies of the Software, and to permit persons to whom the
0009  * Software is furnished to do so, subject to the following conditions:
0010  *
0011  * The above copyright notice and this permission notice shall be included in
0012  * all copies or substantial portions of the Software.
0013  *
0014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0017  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0018  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0020  * OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  */
0023 
0024 #ifndef _SMU7_THERMAL_H_
0025 #define _SMU7_THERMAL_H_
0026 
0027 #include "hwmgr.h"
0028 
0029 #define SMU7_THERMAL_HIGH_ALERT_MASK         0x1
0030 #define SMU7_THERMAL_LOW_ALERT_MASK          0x2
0031 
0032 #define SMU7_THERMAL_MINIMUM_TEMP_READING    -256
0033 #define SMU7_THERMAL_MAXIMUM_TEMP_READING    255
0034 
0035 #define SMU7_THERMAL_MINIMUM_ALERT_TEMP      0
0036 #define SMU7_THERMAL_MAXIMUM_ALERT_TEMP      255
0037 
0038 #define FDO_PWM_MODE_STATIC  1
0039 #define FDO_PWM_MODE_STATIC_RPM 5
0040 
0041 extern int smu7_thermal_get_temperature(struct pp_hwmgr *hwmgr);
0042 extern int smu7_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr);
0043 extern int smu7_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr, struct phm_fan_speed_info *fan_speed_info);
0044 extern int smu7_fan_ctrl_get_fan_speed_pwm(struct pp_hwmgr *hwmgr, uint32_t *speed);
0045 extern int smu7_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr);
0046 extern int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode);
0047 extern int smu7_fan_ctrl_set_fan_speed_pwm(struct pp_hwmgr *hwmgr, uint32_t speed);
0048 extern int smu7_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr);
0049 extern int smu7_thermal_ctrl_uninitialize_thermal_controller(struct pp_hwmgr *hwmgr);
0050 extern int smu7_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed);
0051 extern int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed);
0052 extern int smu7_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr);
0053 extern int smu7_thermal_disable_alert(struct pp_hwmgr *hwmgr);
0054 extern int smu7_fan_ctrl_start_smc_fan_control(struct pp_hwmgr *hwmgr);
0055 extern int smu7_start_thermal_controller(struct pp_hwmgr *hwmgr,
0056                 struct PP_TemperatureRange *temperature_range);
0057 #endif
0058