diff options
author | JustArchi <JustArchi@JustArchi.net> | 2015-12-20 22:51:06 +1100 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2015-12-21 23:12:50 +1100 |
commit | 73bb47e7f14bb1d88b70cc46e532b2ec71d66049 (patch) | |
tree | 674781d2b0ac70e1aeb518f17b07cae0f905e776 | |
parent | 67f8047290499070df082f5a2de81a387cfcfdd6 (diff) | |
download | kernel_samsung_smdk4412-73bb47e7f14bb1d88b70cc46e532b2ec71d66049.zip kernel_samsung_smdk4412-73bb47e7f14bb1d88b70cc46e532b2ec71d66049.tar.gz kernel_samsung_smdk4412-73bb47e7f14bb1d88b70cc46e532b2ec71d66049.tar.bz2 |
cpufreq: pegasusq: allow keeping at least two cores awake
fixes a2dp issues
original commit:
https://github.com/ArchiDroid/ArchiKernel/commit/1f5b6449dfddee4bf1528f85d97e250e1431dcd5
Change-Id: If7d5ec882a10d033d71be6c3a310917bf0df9b80
-rw-r--r-- | drivers/cpufreq/Kconfig | 11 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_pegasusq.c | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 8112af3..9d4b5dd 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -17,6 +17,17 @@ config CPU_FREQ if CPU_FREQ +config HAS_BLUETOOTH_DEADLOCKS + bool "System has bluetooth deadlocks" + depends on BT_BCM4334 + default y + help + It seems that Android Lollipop introduced a bug which causes an + event listener to deadlock when A2DP is used and governor forces + only one core to stay awake. This hack prevents such situation by + always leaving at least two cores online. I wish we could get rid + of this at some point. + config CPU_FREQ_TABLE tristate diff --git a/drivers/cpufreq/cpufreq_pegasusq.c b/drivers/cpufreq/cpufreq_pegasusq.c index c44af54..aa172a1 100644 --- a/drivers/cpufreq/cpufreq_pegasusq.c +++ b/drivers/cpufreq/cpufreq_pegasusq.c @@ -155,7 +155,11 @@ static unsigned int get_nr_run_avg(void) #define MAX_HOTPLUG_RATE (40u) #define DEF_MAX_CPU_LOCK (0) +#ifdef CONFIG_HAS_BLUETOOTH_DEADLOCKS +#define DEF_MIN_CPU_LOCK (2) +#else #define DEF_MIN_CPU_LOCK (0) +#endif #define DEF_CPU_UP_FREQ (500000) #define DEF_CPU_DOWN_FREQ (200000) #define DEF_UP_NR_CPUS (1) |