cpufreq: eff: add HAFM-TB featuring.
authorChoonghoon Park <choong.park@samsung.com>
Tue, 12 Jun 2018 10:10:47 +0000 (19:10 +0900)
committerlakkyung.jung <lakkyung.jung@samsung.com>
Mon, 23 Jul 2018 05:59:30 +0000 (14:59 +0900)
Change-Id: I4844df6e79494f6234b5e92bfd5aaf9be1caa04d

drivers/cpufreq/exynos-ff.c

index 19e609b8372b85dd8ed65cdea2fccc1184d80737..5d50d7d3696c4a32a630ead07a344a44099ef71c 100644 (file)
@@ -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);