From: Choonghoon Park Date: Tue, 12 Jun 2018 10:10:47 +0000 (+0900) Subject: cpufreq: eff: add HAFM-TB featuring. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b8db687a4a40af43bc9c7becee14ae08ae98cb80;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git cpufreq: eff: add HAFM-TB featuring. Change-Id: I4844df6e79494f6234b5e92bfd5aaf9be1caa04d --- diff --git a/drivers/cpufreq/exynos-ff.c b/drivers/cpufreq/exynos-ff.c index 19e609b8372b..5d50d7d3696c 100644 --- a/drivers/cpufreq/exynos-ff.c +++ b/drivers/cpufreq/exynos-ff.c @@ -36,6 +36,7 @@ static bool policy_need_filter(struct cpufreq_policy *policy) return cpumask_intersects(policy->cpus, &eff_driver->cpus); } +#ifdef PSTATE_EXYNOS_HAFM_TB static bool check_filtering(unsigned int target_freq, unsigned int flag) { unsigned int cur_freq; @@ -64,6 +65,7 @@ static bool check_boost_freq_throttled(struct cpufreq_policy *policy) return (policy->cur > eff_driver->boost_threshold) && (policy->cur > policy->max); } +#endif /********************************************************************* * EXTERNAL REFERENCE APIs * @@ -87,6 +89,7 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy, if (policy_need_filter(policy)) { mutex_lock(&eff_driver->lock); +#ifdef PSTATE_EXYNOS_HAFM_TB if (check_filtering(target_freq, flag)) goto out; @@ -104,6 +107,7 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy, */ if (!hwi_dvfs_req && target_freq > eff_driver->boost_threshold) target_freq = eff_driver->boost_threshold; +#endif } /* @@ -130,6 +134,7 @@ out: void cpufreq_policy_apply_limits(struct cpufreq_policy *policy) { +#ifdef PSTATE_EXYNOS_HAFM_TB if (policy_need_filter(policy)) { if (check_boost_freq_throttled(policy)) { pr_debug("exynos-ff: wait for boost freq throttling completion\n"); @@ -143,6 +148,7 @@ void cpufreq_policy_apply_limits(struct cpufreq_policy *policy) return; } } +#endif if (policy->max < policy->cur) __cpufreq_driver_target(policy, policy->max, CPUFREQ_RELATION_H);