soc: rockchip: system_monitor: disable status_max_limit when boosted
Signed-off-by: Liang Chen <cl@rock-chips.com> Change-Id: I60c7b3cb1ab68c06852871cf9fa435031915c328
This commit is contained in:
@ -68,6 +68,7 @@ struct system_monitor {
|
||||
int temp_hysteresis;
|
||||
unsigned int delay;
|
||||
bool is_temp_offline;
|
||||
bool boosted;
|
||||
};
|
||||
|
||||
static unsigned long system_status;
|
||||
@ -741,6 +742,20 @@ int rockchip_monitor_cpu_high_temp_adjust(struct monitor_dev_info *info,
|
||||
}
|
||||
EXPORT_SYMBOL(rockchip_monitor_cpu_high_temp_adjust);
|
||||
|
||||
void rockchip_monitor_set_boosted(void)
|
||||
{
|
||||
if (system_monitor)
|
||||
system_monitor->boosted = true;
|
||||
}
|
||||
EXPORT_SYMBOL(rockchip_monitor_set_boosted);
|
||||
|
||||
void rockchip_monitor_clear_boosted(void)
|
||||
{
|
||||
if (system_monitor)
|
||||
system_monitor->boosted = false;
|
||||
}
|
||||
EXPORT_SYMBOL(rockchip_monitor_clear_boosted);
|
||||
|
||||
static int rockchip_monitor_update_devfreq(struct devfreq *df)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -1417,7 +1432,8 @@ static int rockchip_monitor_cpufreq_policy_notifier(struct notifier_block *nb,
|
||||
if (limit_freq > info->wide_temp_limit / 1000)
|
||||
limit_freq = info->wide_temp_limit / 1000;
|
||||
}
|
||||
if (info->status_max_limit &&
|
||||
if (!system_monitor->boosted &&
|
||||
info->status_max_limit &&
|
||||
limit_freq > info->status_max_limit)
|
||||
limit_freq = info->status_max_limit;
|
||||
|
||||
|
||||
@ -103,6 +103,7 @@ struct monitor_dev_info {
|
||||
bool is_high_temp;
|
||||
bool is_low_temp_enabled;
|
||||
bool is_status_freq_fixed;
|
||||
bool boosted;
|
||||
};
|
||||
|
||||
struct monitor_dev_profile {
|
||||
@ -132,6 +133,8 @@ rockchip_system_monitor_adjust_cdev_state(struct thermal_cooling_device *cdev,
|
||||
int temp, unsigned long *state);
|
||||
int rockchip_monitor_opp_set_rate(struct monitor_dev_info *info,
|
||||
unsigned long target_freq);
|
||||
void rockchip_monitor_set_boosted(void);
|
||||
void rockchip_monitor_clear_boosted(void);
|
||||
#else
|
||||
static inline struct monitor_dev_info *
|
||||
rockchip_system_monitor_register(struct device *dev,
|
||||
@ -188,6 +191,8 @@ static inline int rockchip_monitor_opp_set_rate(struct monitor_dev_info *info,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void rockchip_monitor_set_boosted(void) {};
|
||||
static inline void rockchip_monitor_set_boosted(void) {};
|
||||
#endif /* CONFIG_ROCKCHIP_SYSTEM_MONITOR */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user