[RAMEN9610-9421][COMMON] cpufreq: acme: request prefer perf at cpufreq_min_limit
authorPark Bumgyu <bumgyu.park@samsung.com>
Thu, 23 Aug 2018 06:51:04 +0000 (15:51 +0900)
committerhskang <hs1218.kang@samsung.com>
Thu, 13 Dec 2018 11:41:55 +0000 (20:41 +0900)
Change-Id: I6b78a333c52708b59bf84c664795e370d9d8de7c
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
drivers/cpufreq/exynos-acme.c
drivers/cpufreq/exynos-acme.h

index 97ee5d550f365d87d40d7efb49da0818de13a45f..ee1ec9f3088f4fa0369abfada2557324af42af5f 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/cpu_cooling.h>
 #include <linux/suspend.h>
 #include <linux/ems.h>
+#include <linux/ems_service.h>
 
 #include <soc/samsung/cal-if.h>
 #include <soc/samsung/ect_parser.h>
@@ -884,6 +885,7 @@ static ssize_t store_cpufreq_min_limit(struct kobject *kobj,
                /* Clear all constraint by cpufreq_min_limit */
                if (input < 0) {
                        pm_qos_update_request(&domain->user_min_qos_req, 0);
+                       request_kernel_prefer_perf(STUNE_TOPAPP, 0);
                        continue;
                }
 
@@ -904,6 +906,8 @@ static ssize_t store_cpufreq_min_limit(struct kobject *kobj,
                freq = min(freq, domain->max_freq);
                pm_qos_update_request(&domain->user_min_qos_req, freq);
 
+               request_kernel_prefer_perf(STUNE_TOPAPP, domain->user_boost);
+
                set_max = true;
        }
 
@@ -1463,6 +1467,9 @@ static __init int init_domain(struct exynos_cpufreq_domain *domain,
        if (!of_property_read_u32(dn, "user-default-qos", &val))
                domain->user_default_qos = val;
 
+       if (!of_property_read_u32(dn, "user-boost", &val))
+               domain->user_boost = val;
+
        if (of_property_read_bool(dn, "need-awake"))
                domain->need_awake = true;
 
index 7be15e6c9add7563ac3e705790d697e17cfd132f..dcd2ae8afe8599d6f8836013987235028d9846fe 100644 (file)
@@ -68,6 +68,7 @@ struct exynos_cpufreq_domain {
        struct notifier_block           pm_qos_max_notifier;
 
        /* for sysfs */
+       int                             user_boost;
        unsigned int                    user_default_qos;
 
        /* freq boost */