s5e8825: Tuning
This commit is contained in:
parent
555d8a35de
commit
f35c27aba8
7 changed files with 41 additions and 119 deletions
|
@ -1743,6 +1743,12 @@ static int init_domain(struct exynos_cpufreq_domain *domain,
|
|||
if (!of_property_read_u32(dn, "min-freq", &val))
|
||||
domain->min_freq = max(domain->min_freq, val);
|
||||
|
||||
if (domain->id == 1) { // BIG
|
||||
domain->boot_freq = 2400000;
|
||||
} else if (domain->id == 0) {
|
||||
domain->boot_freq = 2002000;
|
||||
}
|
||||
|
||||
/* Get freq-table from device tree and cut the out of range */
|
||||
raw_table_size = of_property_count_u32_elems(dn, "freq-table");
|
||||
if (of_property_read_u32_array(dn, "freq-table",
|
||||
|
@ -1832,7 +1838,6 @@ static int init_domain(struct exynos_cpufreq_domain *domain,
|
|||
/*
|
||||
* Initialize other items.
|
||||
*/
|
||||
domain->boot_freq = cal_dfs_get_boot_freq(domain->cal_id);
|
||||
domain->resume_freq = cal_dfs_get_resume_freq(domain->cal_id);
|
||||
domain->old = get_freq(domain);
|
||||
if (domain->old < domain->min_freq || domain->max_freq < domain->old) {
|
||||
|
|
|
@ -561,6 +561,15 @@ static int ect_parse_ap_thermal_function(int parser_version, void *address, stru
|
|||
ect_parse_integer(&address, &range->max_frequency);
|
||||
if (range->max_frequency == 897000) {
|
||||
range->max_frequency = GPU_CUSTOM_MAX_CLOCK;
|
||||
} else if (range->max_frequency == 2600000
|
||||
|| range->max_frequency == 2496000 || range->max_frequency == 2400000 ||
|
||||
range->max_frequency == 2288000 || range->max_frequency == 2112000 ||
|
||||
range->max_frequency == 2016000 || range->max_frequency == 1920000) {
|
||||
range->max_frequency = 2704000;
|
||||
} else if (range->max_frequency == 2002000 || range->max_frequency == 1536000) {
|
||||
range->max_frequency = 2210000;
|
||||
} else if (range->max_frequency == 960000) {
|
||||
range->max_frequency = 2002000;
|
||||
}
|
||||
ect_parse_integer(&address, &range->sw_trip);
|
||||
ect_parse_integer(&address, &range->flag);
|
||||
|
|
|
@ -191,10 +191,7 @@ static unsigned int get_afm_target_max_limit(struct afm_domain *afm_dom)
|
|||
/* Find the position of the current frequency in the frequency table. */
|
||||
index = get_afm_freq_index(stats, afm_dom->clipped_freq);
|
||||
|
||||
/* Find target max limit that lower by "down_step" than current max limit */
|
||||
index -= afm_dom->down_step;
|
||||
if (index > stats->max_state)
|
||||
index = stats->max_state;
|
||||
/* Return itself */
|
||||
ret_freq = stats->freq_table[index];
|
||||
|
||||
return ret_freq;
|
||||
|
|
|
@ -968,40 +968,6 @@ static void freq_qos_release(struct work_struct *work)
|
|||
}
|
||||
}
|
||||
|
||||
static int ufc_update_little_min_limit(int target_freq)
|
||||
{
|
||||
struct ufc_domain *ufc_dom;
|
||||
|
||||
list_for_each_entry(ufc_dom, &ufc.ufc_domain_list, list) {
|
||||
unsigned int col_idx = ufc_dom->table_col_idx;
|
||||
|
||||
if (col_idx != ufc.col_lit)
|
||||
continue;
|
||||
|
||||
if (target_freq) {
|
||||
freq_qos_update_request(&ufc_dom->hold_lit_max_qos_req, ufc_dom->max_freq);
|
||||
freq_qos_update_request(&ufc_dom->user_lit_min_qos_req, target_freq);
|
||||
|
||||
if (!ufc_dom->little_min_timeout)
|
||||
break;
|
||||
|
||||
/* set a boosting timeout */
|
||||
if (delayed_work_pending(&ufc_dom->work))
|
||||
cancel_delayed_work_sync(&ufc_dom->work);
|
||||
|
||||
schedule_delayed_work(&ufc_dom->work,
|
||||
msecs_to_jiffies(ufc_dom->little_min_timeout));
|
||||
} else {
|
||||
freq_qos_update_request(&ufc_dom->hold_lit_max_qos_req, ufc_dom->hold_freq);
|
||||
freq_qos_update_request(&ufc_dom->user_lit_min_qos_req, ufc_dom->min_freq);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ufc_update_max_limit(void)
|
||||
{
|
||||
struct ufc_domain *ufc_dom;
|
||||
|
@ -1044,42 +1010,6 @@ static void ufc_update_max_limit(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void ufc_update_min_limit_wo_boost(void)
|
||||
{
|
||||
struct ufc_domain *ufc_dom;
|
||||
struct ufc_table_info *table_info;
|
||||
int target_freq, target_idx;
|
||||
|
||||
table_info = get_table_info(PM_QOS_MIN_LIMIT);
|
||||
if (!table_info) {
|
||||
pr_err("failed to find target table\n");
|
||||
return;
|
||||
}
|
||||
|
||||
target_freq = ufc.last_min_wo_boost_input;
|
||||
|
||||
/* clear min limit */
|
||||
if (target_freq == RELEASE) {
|
||||
ufc_release_freq(PM_QOS_MIN_LIMIT_WO_BOOST);
|
||||
return;
|
||||
}
|
||||
|
||||
target_idx = ufc_get_proper_table_index(target_freq,
|
||||
table_info, PM_QOS_MIN_LIMIT_WO_BOOST);
|
||||
|
||||
/* Big ----> Lit */
|
||||
list_for_each_entry(ufc_dom, &ufc.ufc_domain_list, list) {
|
||||
unsigned int col_idx = ufc_dom->table_col_idx;
|
||||
|
||||
target_freq = table_info->ufc_table[col_idx][target_idx];
|
||||
target_freq = ufc_adjust_freq(target_freq, ufc_dom,
|
||||
PM_QOS_MIN_LIMIT_WO_BOOST);
|
||||
|
||||
freq_qos_update_request(&ufc_dom->user_min_qos_wo_boost_req,
|
||||
target_freq);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* sysfs function
|
||||
*/
|
||||
|
@ -1111,12 +1041,6 @@ static ssize_t cpufreq_max_limit_show(struct kobject *kobj, char *buf)
|
|||
static ssize_t cpufreq_max_limit_store(struct kobject *kobj,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
int input;
|
||||
|
||||
if (!sscanf(buf, "%8d", &input))
|
||||
return -EINVAL;
|
||||
ufc_update_request(USERSPACE, PM_QOS_MAX_LIMIT, input);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -1166,13 +1090,6 @@ static ssize_t limit_stat_show(struct kobject *kobj, char *buf)
|
|||
static ssize_t cpufreq_min_limit_store(struct kobject *kobj,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
int input;
|
||||
|
||||
if (!sscanf(buf, "%8d", &input))
|
||||
return -EINVAL;
|
||||
|
||||
ufc_update_request(USERSPACE, PM_QOS_MIN_LIMIT, input);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -1184,14 +1101,6 @@ static ssize_t cpufreq_min_limit_wo_boost_show(struct kobject *kobj, char *buf)
|
|||
static ssize_t cpufreq_min_limit_wo_boost_store(struct kobject *kobj,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
int input;
|
||||
|
||||
if (!sscanf(buf, "%8d", &input))
|
||||
return -EINVAL;
|
||||
|
||||
ufc.last_min_wo_boost_input = input;
|
||||
ufc_update_min_limit_wo_boost();
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -1203,13 +1112,6 @@ static ssize_t little_max_limit_show(struct kobject *kobj, char *buf)
|
|||
static ssize_t little_max_limit_store(struct kobject *kobj, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
int input;
|
||||
|
||||
if (!sscanf(buf, "%8d", &input))
|
||||
return -EINVAL;
|
||||
|
||||
ufc_update_request(USERSPACE, PM_QOS_LITTLE_MAX_LIMIT, input);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -1221,13 +1123,6 @@ static ssize_t little_min_limit_show(struct kobject *kobj, char *buf)
|
|||
static ssize_t little_min_limit_store(struct kobject *kobj, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
int input;
|
||||
|
||||
if (!sscanf(buf, "%8d", &input))
|
||||
return -EINVAL;
|
||||
|
||||
ufc.prio_vfreq[PM_QOS_LITTLE_MIN_LIMIT] = input;
|
||||
ufc_update_little_min_limit(input);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -1240,14 +1135,6 @@ static ssize_t over_limit_show(struct kobject *kobj, char *buf)
|
|||
static ssize_t over_limit_store(struct kobject *kobj, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
int input;
|
||||
|
||||
if (!sscanf(buf, "%8d", &input))
|
||||
return -EINVAL;
|
||||
|
||||
ufc.prio_vfreq[PM_QOS_OVER_LIMIT] = input;
|
||||
ufc_update_request(USERSPACE, PM_QOS_OVER_LIMIT, input);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
@ -738,6 +738,17 @@ static struct thermal_zone_device* parse_ect_cooling_level(struct thermal_coolin
|
|||
unsigned long max_level = 0;
|
||||
int level;
|
||||
|
||||
if (function->range_list[i].max_frequency == 2600000 ||
|
||||
function->range_list[i].max_frequency == 2496000 || function->range_list[i].max_frequency == 2400000 ||
|
||||
function->range_list[i].max_frequency == 2288000 || function->range_list[i].max_frequency == 2112000 ||
|
||||
function->range_list[i].max_frequency == 2016000 || function->range_list[i].max_frequency == 1920000) {
|
||||
function->range_list[i].max_frequency = 2704000;
|
||||
} else if (function->range_list[i].max_frequency == 2002000 || function->range_list[i].max_frequency == 1536000) {
|
||||
function->range_list[i].max_frequency = 2210000;
|
||||
} else if (function->range_list[i].max_frequency == 960000) {
|
||||
function->range_list[i].max_frequency = 2002000;
|
||||
}
|
||||
|
||||
temperature = function->range_list[i].lower_bound_temperature;
|
||||
freq = function->range_list[i].max_frequency;
|
||||
|
||||
|
|
|
@ -2120,6 +2120,19 @@ static int exynos_tmu_parse_ect(struct exynos_tmu_data *data)
|
|||
|
||||
for (i = 0; i < function->num_of_range; ++i) {
|
||||
temperature = function->range_list[i].lower_bound_temperature;
|
||||
|
||||
if (function->range_list[i].max_frequency == 2600000 ||
|
||||
function->range_list[i].max_frequency == 2496000 || function->range_list[i].max_frequency == 2400000 ||
|
||||
function->range_list[i].max_frequency == 2288000 || function->range_list[i].max_frequency == 2112000 ||
|
||||
function->range_list[i].max_frequency == 2016000 || function->range_list[i].max_frequency == 1920000) {
|
||||
function->range_list[i].max_frequency = 2704000;
|
||||
} else if (function->range_list[i].max_frequency == 2002000 || function->range_list[i].max_frequency == 1536000) {
|
||||
function->range_list[i].max_frequency = 2210000;
|
||||
} else if (function->range_list[i].max_frequency == 960000) {
|
||||
function->range_list[i].max_frequency = 2002000;
|
||||
}
|
||||
|
||||
|
||||
freq = function->range_list[i].max_frequency;
|
||||
tz->ops->set_trip_temp(tz, i, temperature * MCELSIUS);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
XY_VERSION="R3.2"
|
||||
XY_VERSION="R3.4-SUN"
|
||||
|
||||
set -e
|
||||
|
||||
|
|
Loading…
Reference in a new issue