[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)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:24:57 +0000 (20:24 +0300)
Change-Id: I6b78a333c52708b59bf84c664795e370d9d8de7c
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
drivers/cpufreq/exynos-acme.c
drivers/cpufreq/exynos-acme.h

index 0ef8cf2b71f6e215fabe9e9ea2e5991cfcaa747b..d2d57de2bc639fd3a52b2564a1e01575ad52cdcd 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>
@@ -901,6 +902,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;
                }
 
@@ -921,6 +923,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;
        }
 
@@ -1480,6 +1484,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 */