summaryrefslogtreecommitdiffstats
path: root/power-8916.c
diff options
context:
space:
mode:
authornico <nicorg2529@gmail.com>2018-12-13 05:08:01 +0000
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:57 +0300
commit60d5a540eec686e78dfa03b6676fc926d96f58df (patch)
tree7458e234c81d999848bd932acfb8623828606536 /power-8916.c
parent919a6ad95009492ac96b11cb1bf50ae22e7c2d6b (diff)
downloadvendor_qcom_opensource_power-60d5a540eec686e78dfa03b6676fc926d96f58df.tar.gz
vendor_qcom_opensource_power-60d5a540eec686e78dfa03b6676fc926d96f58df.tar.bz2
vendor_qcom_opensource_power-60d5a540eec686e78dfa03b6676fc926d96f58df.zip
power: msm8916: Drop MIN_FREQ tweak for 8939
Leave MIN_FREQ as default except for high performance profile. Besides, big cluster is turned off by power_set_interactive_ext when display off for some 8939 device. So, MIN_FREQ tweak would not work anyway. Change-Id: I57545364ab331f171d1ee1c26787189668c60a91
Diffstat (limited to 'power-8916.c')
-rw-r--r--power-8916.c42
1 files changed, 2 insertions, 40 deletions
diff --git a/power-8916.c b/power-8916.c
index fedda05..8ffb647 100644
--- a/power-8916.c
+++ b/power-8916.c
@@ -49,14 +49,6 @@
#include "power-common.h"
#include "utils.h"
-#define MIN_FREQ_CPU0_DISP_OFF 400000
-#define MIN_FREQ_CPU0_DISP_ON 960000
-
-const char* scaling_min_freq[4] = {"/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq",
- "/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq",
- "/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq",
- "/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq"};
-
/**
* Returns true if the target is MSM8916.
*/
@@ -184,7 +176,6 @@ int power_hint_override(power_hint_t hint, void* data) {
int set_interactive_override(int on) {
char governor[80];
- char tmp_str[NODE_MAX];
if (get_scaling_governor(governor, sizeof(governor)) == -1) {
ALOGE("Can't obtain scaling governor.");
@@ -202,43 +193,14 @@ int set_interactive_override(int on) {
} else {
if (is_interactive_governor(governor)) {
int resource_values[] = {TR_MS_CPU0_50, TR_MS_CPU4_50, THREAD_MIGRATION_SYNC_OFF};
- /* Set CPU0 MIN FREQ to 400Mhz avoid extra peak power
- impact in volume key press */
- snprintf(tmp_str, NODE_MAX, "%d", MIN_FREQ_CPU0_DISP_OFF);
- if (sysfs_write(scaling_min_freq[0], tmp_str) != 0) {
- if (sysfs_write(scaling_min_freq[1], tmp_str) != 0) {
- if (sysfs_write(scaling_min_freq[2], tmp_str) != 0) {
- if (sysfs_write(scaling_min_freq[3], tmp_str) != 0) {
- ALOGE("Failed to write to %s", SCALING_MIN_FREQ);
- }
- }
- }
- }
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
ARRAY_SIZE(resource_values));
}
}
} else {
/* Display on */
- if (is_target_8916()) {
- if (is_interactive_governor(governor)) {
- undo_hint_action(DISPLAY_STATE_HINT_ID);
- }
- } else {
- if (is_interactive_governor(governor)) {
- /* Recovering MIN_FREQ in display ON case */
- snprintf(tmp_str, NODE_MAX, "%d", MIN_FREQ_CPU0_DISP_ON);
- if (sysfs_write(scaling_min_freq[0], tmp_str) != 0) {
- if (sysfs_write(scaling_min_freq[1], tmp_str) != 0) {
- if (sysfs_write(scaling_min_freq[2], tmp_str) != 0) {
- if (sysfs_write(scaling_min_freq[3], tmp_str) != 0) {
- ALOGE("Failed to write to %s", SCALING_MIN_FREQ);
- }
- }
- }
- }
- undo_hint_action(DISPLAY_STATE_HINT_ID);
- }
+ if (is_interactive_governor(governor)) {
+ undo_hint_action(DISPLAY_STATE_HINT_ID);
}
}
return HINT_HANDLED;