Initial OC-UV
/include/linux/cpufreq.h
blob:84a783dd9a57a3ca6024a27dacc22058f47b8ca2 -> blob:e70a8921fecae62141c80436dd22cb984b45eb0c
--- include/linux/cpufreq.h
+++ include/linux/cpufreq.h
@@ -32,8 +32,6 @@
#define CPUFREQ_TRANSITION_NOTIFIER (0)
#define CPUFREQ_POLICY_NOTIFIER (1)
-#define __MP_DECISION_PATCH__
-
#ifdef CONFIG_CPU_FREQ
int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
@@ -58,6 +56,10 @@ static inline int cpufreq_unregister_not
#define CPUFREQ_POLICY_POWERSAVE (1)
#define CPUFREQ_POLICY_PERFORMANCE (2)
+/* Minimum frequency cutoff to notify the userspace about cpu utilization
+ * changes */
+#define MIN_CPU_UTIL_NOTIFY 40
+
/* Frequency values here are CPU kHz so that hardware which doesn't run
* with some frequencies can complain without having to guess what per
* cent / per mille means.
@@ -98,9 +100,7 @@ struct cpufreq_policy {
unsigned int max; /* in kHz */
unsigned int cur; /* in kHz, only needed if cpufreq
* governors are used */
-#if defined(__MP_DECISION_PATCH__)
- unsigned int utils; /* in %, CPU utilization */
-#endif
+ unsigned int util; /* CPU utilization at max frequency */
unsigned int policy; /* see above */
struct cpufreq_governor *governor; /* see below */
@@ -259,14 +259,9 @@ int cpufreq_register_driver(struct cpufr
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
-#if defined(__MP_DECISION_PATCH__)
void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);
void cpufreq_notify_utilization(struct cpufreq_policy *policy,
unsigned int load);
-#else
-void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);
-#endif
-
static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max)
{
@@ -346,14 +341,17 @@ static inline unsigned int cpufreq_quick
#ifdef CONFIG_SEC_DVFS
-#define TOUCH_BOOSTER_FIRST_FREQ_LIMIT 1134000
-#define TOUCH_BOOSTER_SECOND_FREQ_LIMIT 810000
-#define TOUCH_BOOSTER_FREQ_LIMIT 486000
-
-#define LOW_MAX_FREQ_LIMIT 1188000
-
-#define MIN_FREQ_LIMIT 384000
-#define MAX_FREQ_LIMIT 1900000
+#define TOUCH_BOOSTER_FIRST_FREQ_LIMIT 1134000
+#define TOUCH_BOOSTER_SECOND_FREQ_LIMIT 810000
+#define TOUCH_BOOSTER_FREQ_LIMIT 486000
+
+#define LOW_MAX_FREQ_LIMIT 1188000
+
+#define MIN_FREQ_LIMIT CONFIG_CPU_FREQ_MIN_SCALING_LIMIT
+#define MAX_FREQ_LIMIT CONFIG_CPU_FREQ_MAX_SCALING_LIMIT
+#define FREQ_TABLE_SIZE 38
+#define FREQ_TABLE_SIZE_OFFSET 6
+#define FREQ_STEPS 30
enum {
SET_MIN = 0,
@@ -441,9 +439,15 @@ extern struct cpufreq_governor cpufreq_g
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE)
extern struct cpufreq_governor cpufreq_gov_conservative;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_conservative)
+#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_LAGFREE)
+extern struct cpufreq_governor cpufreq_gov_lagfree;
+#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_lagfree)
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE)
extern struct cpufreq_governor cpufreq_gov_interactive;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_interactive)
+#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASSV2)
+extern struct cpufreq_governor cpufreq_gov_smartassv2;
+#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_smartassv2)
#endif