mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
soc: rockchip: system_monitor: Fix max frequency when use high_limit_table
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Change-Id: Ie45f3c704b89867274f929dad5c6fcfbd56c2052
This commit is contained in:
@@ -900,18 +900,22 @@ EXPORT_SYMBOL(rockchip_monitor_cpu_low_temp_adjust);
|
||||
int rockchip_monitor_cpu_high_temp_adjust(struct monitor_dev_info *info,
|
||||
bool is_high)
|
||||
{
|
||||
if (!info->high_limit)
|
||||
return 0;
|
||||
|
||||
if (!freq_qos_request_active(&info->max_temp_freq_req))
|
||||
return 0;
|
||||
|
||||
if (info->high_limit_table) {
|
||||
freq_qos_update_request(&info->max_temp_freq_req,
|
||||
info->high_limit / 1000);
|
||||
if (info->high_limit)
|
||||
freq_qos_update_request(&info->max_temp_freq_req,
|
||||
info->high_limit / 1000);
|
||||
else
|
||||
freq_qos_update_request(&info->max_temp_freq_req,
|
||||
FREQ_QOS_MAX_DEFAULT_VALUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!info->high_limit)
|
||||
return 0;
|
||||
|
||||
if (is_high)
|
||||
freq_qos_update_request(&info->max_temp_freq_req,
|
||||
info->high_limit / 1000);
|
||||
@@ -949,15 +953,19 @@ int rockchip_monitor_dev_high_temp_adjust(struct monitor_dev_info *info,
|
||||
if (!dev_pm_qos_request_active(&info->dev_max_freq_req))
|
||||
return 0;
|
||||
|
||||
if (!info->high_limit)
|
||||
return 0;
|
||||
|
||||
if (info->high_limit_table) {
|
||||
dev_pm_qos_update_request(&info->dev_max_freq_req,
|
||||
info->high_limit / 1000);
|
||||
if (info->high_limit)
|
||||
dev_pm_qos_update_request(&info->dev_max_freq_req,
|
||||
info->high_limit / 1000);
|
||||
else
|
||||
dev_pm_qos_update_request(&info->dev_max_freq_req,
|
||||
PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!info->high_limit)
|
||||
return 0;
|
||||
|
||||
if (is_high)
|
||||
dev_pm_qos_update_request(&info->dev_max_freq_req,
|
||||
info->high_limit / 1000);
|
||||
|
||||
Reference in New Issue
Block a user