MPDECISION: minor fixes to mpdecision

file:e8d5431cc8b7402739b38cd394b7e6ffbc110929 -> file:e6d3f5be50124b78152c64a57cc65b0afb1bcc9d
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -1531,46 +1531,7 @@ config MSM_MPDEC
help
This enables kernel based multi core control.
(up/down hotplug based on load)
-config MSM_MPDEC_STARTDELAY
- int "Deplay before starting MP DECISION"
- default 70000
- depends on MSM_MPDEC
-config MSM_MPDEC_DELAY
- int "Deplay before resuming MP DECISION"
- default 500
- depends on MSM_MPDEC
-
-config MSM_MPDEC_PAUSE
- int "How long to pause after external process controls cpu"
- default 10000
- depends on MSM_MPDEC
-
-config MSM_MPDEC_SCROFF_FREQ
- int "Screen Off MAX CPU"
- default 384000
- depends on MSM_MPDEC
-
-config MSM_MPDEC_IDLE_FREQ
- int "Idle MAX CPU"
- default 384000
- depends on MSM_MPDEC
-
-config MSM_MPDEC
- bool "Enable kernel based mpdecision"
- depends on MSM_SMP
- default n
- help
- This enables kernel based multi core control.
- (up/down hotplug based on load)
-
-config MSM_MPDEC
- bool "Enable kernel based mpdecision"
- depends on MSM_SMP
- default n
- help
- This enables kernel based multi core control.
- (up/down hotplug based on load)
if CPU_FREQ_MSM
file:311459d2d06175fd8cb248fd81f70a12aeb2ac84 -> file:758c84a41343b07b073a4bb48634c5322cd94f55
--- a/arch/arm/mach-msm/msm_mpdecision.c
+++ b/arch/arm/mach-msm/msm_mpdecision.c
@@ -80,7 +80,7 @@ static struct msm_mpdec_tuners {
.min_cpus = 1,
};
-static unsigned int NwNs_Threshold[8] = {19, 10, 28, 30, 32, 30, 0, 35};
+static unsigned int NwNs_Threshold[8] = {12, 0, 25, 20, 32, 28, 0, 35};
static unsigned int TwTs_Threshold[8] = {140, 0, 140, 190, 140, 190, 0, 190};
extern unsigned int get_rq_info(void);
@@ -312,9 +312,21 @@ static void msm_mpdec_late_resume(struct
for_each_possible_cpu(cpu)
per_cpu(msm_mpdec_cpudata, cpu).device_suspended = false;
+ mutex_lock(&per_cpu(msm_mpdec_cpudata, 1).suspend_mutex);
+ if (!cpu_online(1)) {
+ /* Always enable cpu1 when screen comes online.
+ * This boosts the wakeup process. */
+ cpu_up(1);
+ per_cpu(msm_mpdec_cpudata, 1).on_time = ktime_to_ms(ktime_get());
+ per_cpu(msm_mpdec_cpudata, 1).online = true;
+ pr_info(MPDEC_TAG"Screen -> on. Hot plugged CPU1 | Mask=[%d%d%d%d]\n",
+ cpu_online(0), cpu_online(1), cpu_online(2), cpu_online(3));
+ }
+ mutex_unlock(&per_cpu(msm_mpdec_cpudata, 1).suspend_mutex);
+
/* wake up main work thread */
- queue_delayed_work(msm_mpdec_workq, &msm_mpdec_work,
- msecs_to_jiffies(msm_mpdec_tuners_ins.delay));
+ was_paused = true;
+ queue_delayed_work(msm_mpdec_workq, &msm_mpdec_work, 0);
pr_info(MPDEC_TAG"Screen -> on. Activated mpdecision. | Mask=[%d%d%d%d]\n",
cpu_online(0), cpu_online(1), cpu_online(2), cpu_online(3));