From: Soohyun Kim Date: Thu, 29 Mar 2018 04:12:35 +0000 (+0900) Subject: exynos: acme: check need awake when get/set freq. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=98edc88edaf901967b69ceb38702487dc169430c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git exynos: acme: check need awake when get/set freq. Change-Id: Iea6c79e32612dc40e4d7b3e4ceacaa2c4efb1fb0 Signed-off-by: Soohyun Kim --- diff --git a/drivers/cpufreq/exynos-acme.c b/drivers/cpufreq/exynos-acme.c index 354cb3acfd95..a5af5b602c81 100644 --- a/drivers/cpufreq/exynos-acme.c +++ b/drivers/cpufreq/exynos-acme.c @@ -144,7 +144,8 @@ static unsigned int get_freq(struct exynos_cpufreq_domain *domain) { unsigned int freq; - disable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); + if (domain->need_awake) + disable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); freq = (unsigned int)cal_dfs_get_rate(domain->cal_id); if (!freq) { @@ -152,7 +153,8 @@ static unsigned int get_freq(struct exynos_cpufreq_domain *domain) freq = domain->old; } - enable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); + if (domain->need_awake) + enable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); return freq; } @@ -162,7 +164,8 @@ static int set_freq(struct exynos_cpufreq_domain *domain, { int err; - disable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); + if (domain->need_awake) + disable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); exynos_ss_printk("ID %d: %d -> %d (%d)\n", domain->id, domain->old, target_freq, ESS_FLAG_IN); @@ -175,7 +178,8 @@ static int set_freq(struct exynos_cpufreq_domain *domain, exynos_ss_printk("ID %d: %d -> %d (%d)\n", domain->id, domain->old, target_freq, ESS_FLAG_OUT); - enable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); + if (domain->need_awake) + enable_power_mode(cpumask_any(&domain->cpus), POWERMODE_TYPE_CLUSTER); return err; }