WIP: implement a new thermal management algorithm
This is WIP, not very much tested yet.
The current thermal framework is very conservative, and very aggressively
throttles down the CPU frequency. In its current implementation, as soon as the
CPU0 temperature is above limit_temp_degC it will reduce the CPUFREQ by
deacreasing the cpufreq found in the cpu frequency table. It will keep decrease
every second until we've reached 'limit_temp_degC - hystereris', and in turns it
quickly goes down 384MGhz.
In this commit we try to implement a different algorithm, loosely based on
Qualcomm user space thermal manager (thermald). Temperature ranges are defined
as 'states'. When the CPU temperature reaches the threshold of the next state,
we reduce the CPUFREQ according to the next state 'max frequency'. When the
temperature goes below the current state threshold_clr, we go back to the
previous state. So basically we don't throttle down as quickly, and if the
temperature can remain in a state range, we might not even need to throttle down
even more.
For now, this patch also disbale the 'core_control', not sure if that part will
be kept in the final patch..
The 'state' can be defined in the board file (msm_thermal_pdata_actions), and is
passed to the driver pdata. The table requires at least 2 states to work, if it
is not defined, the legacy algo is used.
Of course, testing and tuning is required..
Signed-off-by:
Nicolas Dechesne <nicolas.dechesne@linaro.org>
Loading
Please sign in to comment