有两处温度设定会对GPU有影响:
1. rk3288.dtsi
clk_gpu_dvfs_table: clk_gpu {
operating-points = <
/* KHz uV */
200000 1200000
300000 1200000
400000 1200000
>;
channel = <1>;
tsadc-ch = <2>;
temp-limit-enable = <0>;
target-temp = <90>;
min_temp_limit = <200>;
normal-temp-limit = <
/*delta-temp delta-freq*/
3 50000
6 150000
15 250000
>;
regu-mode-table = <
/*freq mode*/
200000 4
0 3
>;
regu-mode-en = <0>;
status = "okay";
};
当温度超过target-temp后,会按照normal-temp-limit此table中的delta_temp来降低当前的frequency为cur_freq - delta_freq, 最低值不能小于min_temp_limit. 此值用于和当前要设置的target_freq比较,如果target_freq比cur_freq - delta_freq大,那么就设置成cur_freq - delta_freq.
由于temp-limit-enable的值是0,所以此功能默认是关闭的,根据情况决定是否使能.
2. mali_kbase_dvfs.c:
static void mali_dvfs_event_proc(struct work_struct *w)
{
int ret = 0;
struct rk_dvfs_t *dvfs = work_to_dvfs(w);
int temp = rockchip_tsadc_get_temp(1, 0);
if (is_overheated(dvfs)) {
if (could_jump_down(dvfs)) {
I("to jump down for overheated, temp:%d.",
dvfs->temp);
ret = jump_down_actually(dvfs);
if (ret)
E("fail to jump down, ret:%d.", ret);
} else {
W("overheated! temp:%d, but can't jump down anymore.",
dvfs->temp);
}
dvfs->temp = 0;
goto EXIT;
}
}
通过rockchip_tsadc_get_temp()读取,如果温度过高(is_overheated()),这里的阀值设置的是110°,
#define TEMP_UPPER_LIMIT (110)
那么就通过jump_down_actually()降低频率.
有两处温度设定会对GPU有影响:
1. rk3288.dtsi
clk_gpu_dvfs_table: clk_gpu {
operating-points = <
/* KHz uV */
200000 1200000
300000 1200000
400000 1200000
>;
channel = <1>;
tsadc-ch = <2>;
temp-limit-enable = <0>;
target-temp = <90>;
min_temp_limit = <200>;
normal-temp-limit = <
/*delta-temp delta-freq*/
3 50000
6 150000
15 250000
>;
regu-mode-table = <
/*freq mode*/
200000 4
0 3
>;
regu-mode-en = <0>;
status = "okay";
};
当温度超过target-temp后,会按照normal-temp-limit此table中的delta_temp来降低当前的frequency为cur_freq - delta_freq, 最低值不能小于min_temp_limit. 此值用于和当前要设置的target_freq比较,如果target_freq比cur_freq - delta_freq大,那么就设置成cur_freq - delta_freq.
由于temp-limit-enable的值是0,所以此功能默认是关闭的,根据情况决定是否使能.
2. mali_kbase_dvfs.c:
static void mali_dvfs_event_proc(struct work_struct *w)
{
int ret = 0;
struct rk_dvfs_t *dvfs = work_to_dvfs(w);
int temp = rockchip_tsadc_get_temp(1, 0);
if (is_overheated(dvfs)) {
if (could_jump_down(dvfs)) {
I("to jump down for overheated, temp:%d.",
dvfs->temp);
ret = jump_down_actually(dvfs);
if (ret)
E("fail to jump down, ret:%d.", ret);
} else {
W("overheated! temp:%d, but can't jump down anymore.",
dvfs->temp);
}
dvfs->temp = 0;
goto EXIT;
}
}
通过rockchip_tsadc_get_temp()读取,如果温度过高(is_overheated()),这里的阀值设置的是110°,
#define TEMP_UPPER_LIMIT (110)
那么就通过jump_down_actually()降低频率.
举报