diff options
| author | Alex Tsanis <alextsanisbadlorg@gmail.com> | 2017-05-13 12:57:37 +0000 |
|---|---|---|
| committer | Alex Tsanis <alextsanisbadlorg@gmail.com> | 2017-05-13 12:57:37 +0000 |
| commit | 09187ad920949b0c5c17de0afbf4cde04f696340 (patch) | |
| tree | 005b26cc51b79050a71ac525bae5cb8ab56503ea | |
| parent | 3c1449eb8b15abac1b24012e487af459c92eade2 (diff) | |
Revert "galaxys2-common: PowerHAL: Add PegasusQ-support"
This reverts commit 3c1449eb8b15abac1b24012e487af459c92eade2.
Change-Id: Ibce1edc6b9b4db9e81b5076136328a7baaba5f8c
| -rw-r--r-- | power/Android.mk | 1 | ||||
| -rw-r--r-- | power/power.c | 406 | ||||
| -rw-r--r-- | power/power.h | 164 | ||||
| -rw-r--r-- | rootdir/init.smdk4210.rc | 25 |
4 files changed, 102 insertions, 494 deletions
diff --git a/power/Android.mk b/power/Android.mk index 552e62f..cb954a0 100644 --- a/power/Android.mk +++ b/power/Android.mk @@ -16,7 +16,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_CFLAGS += -DUSE_PEGASUSQ_BOOSTING LOCAL_SRC_FILES := power.c LOCAL_SHARED_LIBRARIES := liblog libcutils LOCAL_MODULE := power.$(TARGET_BOOTLOADER_BOARD_NAME) diff --git a/power/power.c b/power/power.c index a93858a..90ea1c6 100644 --- a/power/power.c +++ b/power/power.c @@ -1,6 +1,8 @@ /* - * Copyright (C) 2016 The CyanogenMod Project <http://www.cyanogenmod.org> - * (C) 2017 The LineageOS Project + * Copyright (C) 2012 The Android Open Source Project + * Copyright (C) 2014 The CyanogenMod Project + * Copyright (C) 2014-2015 Andreas Schneider <asn@cryptomilk.org> + * Copyright (C) 2014-2015 Christopher N. Hesse <raymanfx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,36 +16,39 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#define LOG_TAG "PegasusPowerHAL" -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include <stdbool.h> +#include <ctype.h> +#include <dirent.h> #include <errno.h> #include <fcntl.h> +#include <malloc.h> +#include <stdbool.h> +#include <stdlib.h> #include <string.h> +#include <unistd.h> #include <sys/types.h> #include <sys/stat.h> -#include <unistd.h> -#define LOG_NDEBUG 0 -#define DEBUG 1 +#define LOG_TAG "SamsungPowerHAL" +/* #define LOG_NDEBUG 0 */ #include <utils/Log.h> -#include "power.h" - -#define PEGASUSQ_PATH "/sys/devices/system/cpu/cpufreq/pegasusq/" -#define MINMAX_CPU_PATH "/sys/power/" +#include <hardware/hardware.h> +#include <hardware/power.h> -#define US_TO_NS (1000L) +#include "power.h" -static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +struct samsung_power_module { + struct power_module base; +}; -static int current_power_profile = -1; -static bool is_low_power = false; -static bool is_vsync_active = false; +enum power_profile_e { + PROFILE_POWER_SAVE = 0, + PROFILE_BALANCED, + PROFILE_HIGH_PERFORMANCE +}; +static enum power_profile_e current_power_profile = PROFILE_BALANCED; /********************************************************** *** HELPER FUNCTIONS @@ -101,236 +106,43 @@ static void sysfs_write(const char *path, char *s) close(fd); } -static int sysfs_write_str(char *path, char *s) { - char buf[80]; - int len; - int ret = 0; - int fd; - - fd = open(path, O_WRONLY); - if (fd < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error opening %s: %s\n", path, buf); - return -1 ; - } - - len = write(fd, s, strlen(s)); - if (len < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error writing to %s: %s\n", path, buf); - ret = -1; - } - - close(fd); - - return ret; -} - -static int sysfs_write_int(char *path, int value) { - char buf[80]; - snprintf(buf, 80, "%d", value); - return sysfs_write_str(path, buf); -} - -static int sysfs_write_long(char *path, long value) { - char buf[80]; - snprintf(buf, 80, "%ld", value); - return sysfs_write_str(path, buf); -} - -#ifdef LOG_NDEBUG -#define WRITE_PEGASUSQ_PARAM(profile, param) do { \ - ALOGV("%s: WRITE_PEGASUSQ_PARAM(profile=%d, param=%s): new val => %d", __func__, profile, #param, profiles[profile].param); \ - sysfs_write_int(PEGASUSQ_PATH #param, profiles[profile].param); \ -} while (0) -#define WRITE_LOW_POWER_PARAM(profile, param) do { \ - ALOGV("%s: WRITE_LOW_POWER_PARAM(profile=%d, param=%s): new val => %d", \ - __func__, profile, #param, profiles_low_power[profile].param); \ - sysfs_write_int(PEGASUSQ_PATH #param, profiles_low_power[profile].param); \ -} while (0) -#define WRITE_PEGASUSQ_VALUE(param, value) do { \ - ALOGV("%s: WRITE_PEGASUSQ_VALUE(param=%s, value=%d)", __func__, #param, value); \ - sysfs_write_int(PEGASUSQ_PATH #param, value); \ -} while (0) -#define WRITE_MINMAX_CPU(param, value) do { \ - ALOGV("%s: WRITE_MINMAX_CPU(param=%s, value=%d)", __func__, #param, value); \ - sysfs_write_int(MINMAX_CPU_PATH #param, value); \ -} while(0) -#else -#define WRITE_PEGASUSQ_PARAM(profile, param) sysfs_write_int(PEGASUSQ_PATH #param, profiles[profile].param) -#define WRITE_LOW_POWER_PARAM(profile, param) sysfs_write_int(PEGASUSQ_PATH #param, profiles_low_power[profile].param) -#define WRITE_PEGASUSQ_VALUE(param, value) sysfs_write_int(PEGASUSQ_PATH #param, value) -#define WRITE_MINMAX_CPU(param, value) sysfs_write_int(MINMAX_CPU_PATH #param, value) -#endif -static bool check_governor_pegasusq() { - struct stat s; - int err = stat(PEGASUSQ_PATH, &s); - if (err != 0) return false; - return S_ISDIR(s.st_mode); -} +/********************************************************** + *** POWER FUNCTIONS + **********************************************************/ -static bool is_profile_valid(int profile) { - return profile >= 0 && profile < PROFILE_MAX; -} +static void set_power_profile(struct samsung_power_module *samsung_pwr, + enum power_profile_e profile) +{ + int rc; + struct stat sb; -static void set_power_profile(int profile) { - if (!is_profile_valid(profile)) { - ALOGE("%s: unknown profile: %d", __func__, profile); + if (current_power_profile == profile) { return; } - if (profile == current_power_profile) return; - - if (check_governor_pegasusq()) { - WRITE_PEGASUSQ_PARAM(profile, hotplug_freq_1_1); - WRITE_PEGASUSQ_PARAM(profile, hotplug_freq_2_0); - WRITE_PEGASUSQ_PARAM(profile, hotplug_rq_1_1); - WRITE_PEGASUSQ_PARAM(profile, hotplug_rq_2_0); - WRITE_MINMAX_CPU(cpufreq_max_limit, profiles[profile].max_freq); - WRITE_MINMAX_CPU(cpufreq_min_limit, profiles[profile].min_freq); - WRITE_PEGASUSQ_PARAM(profile, up_threshold); - WRITE_PEGASUSQ_PARAM(profile, down_differential); - WRITE_PEGASUSQ_PARAM(profile, min_cpu_lock); - WRITE_PEGASUSQ_PARAM(profile, max_cpu_lock); - WRITE_PEGASUSQ_PARAM(profile, cpu_down_rate); - WRITE_PEGASUSQ_PARAM(profile, sampling_rate); - WRITE_PEGASUSQ_PARAM(profile, io_is_busy); - WRITE_PEGASUSQ_PARAM(profile, boost_freq); - WRITE_PEGASUSQ_PARAM(profile, boost_mincpus); - } else { - switch (profile) { - case PROFILE_POWER_SAVE: - sysfs_write(GOVERNOR_PATH, GOV_POWERSAVE); - ALOGD("%s: activate powersave governor", __func__); - break; - case PROFILE_BALANCED: - sysfs_write(GOVERNOR_PATH, GOV_ONDEMAND); - ALOGD("%s: activate ondemand governor", __func__); - break; - case PROFILE_PERFORMANCE: - sysfs_write(GOVERNOR_PATH, GOV_PERFORMANCE); - ALOGD("%s: activate performance governor", __func__); - break; - } - } - current_power_profile = profile; - - if (DEBUG) ALOGV("%s: %d", __func__, profile); -} - -static void boost(long boost_time) { -#ifdef USE_PEGASUSQ_BOOSTING - if (is_vsync_active || !check_governor_pegasusq()) return; - if (boost_time == -1) { - sysfs_write_int(PEGASUSQ_PATH "boost_lock_time", -1); - } else { - sysfs_write_long(PEGASUSQ_PATH "boost_lock_time", boost_time); - } -#endif -} - -static void end_boost() { -#ifdef USE_PEGASUSQ_BOOSTING - if (is_vsync_active || !check_governor_pegasusq()) return; - sysfs_write_int(PEGASUSQ_PATH "boost_lock_time", 0); -#endif -} - -static void set_low_power(bool low_power) { - if (!is_profile_valid(current_power_profile)) { - if (DEBUG) ALOGV("%s: current_power_profile not set yet", __func__); - return; - } + ALOGV("%s: profile=%d", __func__, profile); - if (!check_governor_pegasusq()) return; - - if (is_low_power == low_power) return; - - if (low_power) { - end_boost(); - - WRITE_LOW_POWER_PARAM(current_power_profile, hotplug_freq_1_1); - WRITE_LOW_POWER_PARAM(current_power_profile, hotplug_freq_2_0); - WRITE_LOW_POWER_PARAM(current_power_profile, hotplug_rq_1_1); - WRITE_LOW_POWER_PARAM(current_power_profile, hotplug_rq_2_0); - WRITE_MINMAX_CPU(cpufreq_max_limit, profiles_low_power[current_power_profile].max_freq); - WRITE_MINMAX_CPU(cpufreq_min_limit, profiles_low_power[current_power_profile].min_freq); - WRITE_LOW_POWER_PARAM(current_power_profile, up_threshold); - WRITE_LOW_POWER_PARAM(current_power_profile, down_differential); - WRITE_LOW_POWER_PARAM(current_power_profile, min_cpu_lock); - WRITE_LOW_POWER_PARAM(current_power_profile, max_cpu_lock); - WRITE_LOW_POWER_PARAM(current_power_profile, cpu_down_rate); - WRITE_LOW_POWER_PARAM(current_power_profile, sampling_rate); - WRITE_LOW_POWER_PARAM(current_power_profile, io_is_busy); - is_low_power = true; - } else { - WRITE_PEGASUSQ_PARAM(current_power_profile, hotplug_freq_1_1); - WRITE_PEGASUSQ_PARAM(current_power_profile, hotplug_freq_2_0); - WRITE_PEGASUSQ_PARAM(current_power_profile, hotplug_rq_1_1); - WRITE_PEGASUSQ_PARAM(current_power_profile, hotplug_rq_2_0); - WRITE_MINMAX_CPU(cpufreq_max_limit, profiles[current_power_profile].max_freq); - WRITE_MINMAX_CPU(cpufreq_min_limit, profiles[current_power_profile].min_freq); - WRITE_PEGASUSQ_PARAM(current_power_profile, up_threshold); - WRITE_PEGASUSQ_PARAM(current_power_profile, down_differential); - WRITE_PEGASUSQ_PARAM(current_power_profile, min_cpu_lock); - WRITE_PEGASUSQ_PARAM(current_power_profile, max_cpu_lock); - WRITE_PEGASUSQ_PARAM(current_power_profile, cpu_down_rate); - WRITE_PEGASUSQ_PARAM(current_power_profile, sampling_rate); - WRITE_PEGASUSQ_PARAM(current_power_profile, io_is_busy); - WRITE_PEGASUSQ_PARAM(current_power_profile, boost_freq); - WRITE_PEGASUSQ_PARAM(current_power_profile, boost_mincpus); - - is_low_power = false; + switch (profile) { + case PROFILE_POWER_SAVE: + sysfs_write(GOVERNOR_PATH, GOV_POWERSAVE); + ALOGD("%s: set powersave mode", __func__); + break; + case PROFILE_BALANCED: + sysfs_write(GOVERNOR_PATH, GOV_BALANCED); + ALOGD("%s: set balanced mode", __func__); + break; + case PROFILE_HIGH_PERFORMANCE: + sysfs_write(GOVERNOR_PATH, GOV_HIGH_PERFORMANCE); + ALOGD("%s: set performance mode", __func__); + break; } -} - - -/* - * (*init)() performs power management setup actions at runtime - * startup, such as to set default cpufreq parameters. This is - * called only by the Power HAL instance loaded by - * PowerManagerService. - */ -static void power_init(__attribute__((unused)) struct power_module *module) { - set_power_profile(PROFILE_BALANCED); - if (DEBUG) ALOGV("%s", __func__); + current_power_profile = profile; } -/* - * The setInteractive function performs power management actions upon the - * system entering interactive state (that is, the system is awake and ready - * for interaction, often with UI devices such as display and touchscreen - * enabled) or non-interactive state (the system appears asleep, display - * usually turned off). The non-interactive state is usually entered after a - * period of inactivity, in order to conserve battery power during such - * inactive periods. - * - * Typical actions are to turn on or off devices and adjust cpufreq parameters. - * This function may also call the appropriate interfaces to allow the kernel - * to suspend the system to low-power sleep state when entering non-interactive - * state, and to disallow low-power suspend when the system is in interactive - * state. When low-power suspend state is allowed, the kernel may suspend the - * system whenever no wakelocks are held. - * - * on is non-zero when the system is transitioning to an interactive / awake - * state, and zero when transitioning to a non-interactive / asleep state. - * - * This function is called to enter non-interactive state after turning off the - * screen (if present), and called to enter interactive state prior to turning - * on the screen. - */ -static void power_set_interactive(__attribute__((unused)) struct power_module *module, int on) { - if (!is_profile_valid(current_power_profile)) { - ALOGD("%s: no power profile selected", __func__); - return; - } - if (!check_governor_pegasusq()) return; - if (DEBUG) ALOGV("%s: setting interactive => %d", __func__, on); - pthread_mutex_lock(&lock); - set_low_power(!on); - pthread_mutex_unlock(&lock); +static void samsung_power_init(struct power_module *module) +{ } /* @@ -369,92 +181,74 @@ static void power_set_interactive(__attribute__((unused)) struct power_module *m * be boosted for a specific duration. The data parameter is an * integer value of the boost duration in microseconds. */ -static void power_hint(__attribute__((unused)) struct power_module *module, power_hint_t hint, void *data) { - int32_t val; - - if (hint == POWER_HINT_SET_PROFILE) { - if (DEBUG) ALOGV("%s: set profile %d", __func__, *(int32_t *)data); - pthread_mutex_lock(&lock); - if (is_vsync_active) { - is_vsync_active = false; - end_boost(); - } - set_power_profile(*(int32_t *)data); - pthread_mutex_unlock(&lock); - } - - if (current_power_profile == PROFILE_POWER_SAVE) return; - - pthread_mutex_lock(&lock); +static void samsung_power_hint(struct power_module *module, + power_hint_t hint, + void *data) +{ + struct samsung_power_module *samsung_pwr = (struct samsung_power_module *) module; switch (hint) { - case POWER_HINT_INTERACTION: - if (DEBUG) ALOGV("%s: interaction", __func__); - if (data) { - val = *(int32_t *)data; - if (data) { - boost(val * US_TO_NS); - } else { - boost(profiles[current_power_profile].interaction_boost_time); - } - } + case POWER_HINT_SET_PROFILE: { + int32_t profile = *((intptr_t *)data); + ALOGV("%s: POWER_HINT_SET_PROFILE", __func__); + set_power_profile(samsung_pwr, profile); + break; + } + case POWER_HINT_LOW_POWER: { + ALOGV("%s: POWER_HINT_LOW_POWER", __func__); break; - case POWER_HINT_LAUNCH: - if (DEBUG) ALOGV("%s: launch", __func__); - boost(profiles[current_power_profile].launch_boost_time); + } + case POWER_HINT_CPU_BOOST: { + ALOGV("%s: POWER_HINT_CPU_BOOST", __func__); break; -/* case POWER_HINT_VSYNC: - if (data) { - ALOGV("%s: vsync", __func__); - boost(-1); - is_vsync_active = true; - } else { - is_vsync_active = false; - end_boost(); - } - break;*/ - case POWER_HINT_CPU_BOOST: - if (DEBUG) ALOGV("%s: cpu_boost", __func__); - boost((*(int32_t *)data) * US_TO_NS); + } + case POWER_HINT_INTERACTION: { + ALOGV("%s: POWER_HINT_INTERACTION", __func__); break; + } default: - //ALOGV("%s: not handled", __func__); break; } - - pthread_mutex_unlock(&lock); } -/* - * (*getFeature) is called to get the current value of a particular - * feature or capability from the hardware or PowerHAL - */ -static int power_get_feature(__attribute__((unused)) struct power_module *module, feature_t feature) { - if (DEBUG) ALOGV("%s: %d", __func__, feature); +static int samsung_get_feature(struct power_module *module __unused, + feature_t feature) +{ if (feature == POWER_FEATURE_SUPPORTED_PROFILES) { - return PROFILE_MAX; + return 3; } - if (DEBUG) ALOGV("%s: unknown feature %d", __func__, feature); + return -1; } +static void samsung_set_feature(struct power_module *module, feature_t feature, int state __unused) +{ +} + +static void samsung_power_set_interactive(struct power_module *module, int on) +{ +} + static struct hw_module_methods_t power_module_methods = { .open = NULL, }; -struct power_module HAL_MODULE_INFO_SYM = { - .common = { - .tag = HARDWARE_MODULE_TAG, - .module_api_version = POWER_MODULE_API_VERSION_0_2, - .hal_api_version = HARDWARE_HAL_API_VERSION, - .id = POWER_HARDWARE_MODULE_ID, - .name = "smdk4210 Power HAL", - .author = "The CyanogenMod Project", - .methods = &power_module_methods, +struct samsung_power_module HAL_MODULE_INFO_SYM = { + .base = { + .common = { + .tag = HARDWARE_MODULE_TAG, + .module_api_version = POWER_MODULE_API_VERSION_0_2, + .hal_api_version = HARDWARE_HAL_API_VERSION, + .id = POWER_HARDWARE_MODULE_ID, + .name = "Samsung Power HAL", + .author = "The CyanogenMod Project", + .methods = &power_module_methods, + }, + + .init = samsung_power_init, + .setInteractive = samsung_power_set_interactive, + .powerHint = samsung_power_hint, + .getFeature = samsung_get_feature, + .setFeature = samsung_set_feature }, - - .init = power_init, - .setInteractive = power_set_interactive, - .powerHint = power_hint, - .getFeature = power_get_feature }; diff --git a/power/power.h b/power/power.h index e6ed434..e91feb9 100644 --- a/power/power.h +++ b/power/power.h @@ -16,166 +16,6 @@ #define GOVERNOR_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" -#define GOV_PERFORMANCE "performance" -#define GOV_ONDEMAND "ondemand" -#define GOV_PEGASUSQ "pegasusq" #define GOV_POWERSAVE "conservative" - -#define MS_TO_NS (1000000L) - -enum { - PROFILE_POWER_SAVE = 0, - PROFILE_BALANCED, - PROFILE_PERFORMANCE, - PROFILE_MAX -}; - -typedef struct governor_settings { - // freq values for core up/down - int hotplug_freq_1_1; - int hotplug_freq_2_0; - // rq sizes for up/down - int hotplug_rq_1_1; - int hotplug_rq_2_0; - // max/min freqs (-1 for default) - int max_freq; - int min_freq; - // load at which to start scaling up - int up_threshold; - // higher down_differential == slower downscaling - int down_differential; - // min/max num of cpus to have online - int min_cpu_lock; - int max_cpu_lock; - // wait sampling_rate * cpu_down_rate us before trying to downscale - int cpu_down_rate; - int sampling_rate; // in microseconds - int io_is_busy; - // boosting - int boost_freq; - int boost_mincpus; - long interaction_boost_time; - long launch_boost_time; -} power_profile; - -static power_profile profiles[PROFILE_MAX] = { - [PROFILE_POWER_SAVE] = { - .hotplug_freq_1_1 = 300000, - .hotplug_freq_2_0 = 300000, - .hotplug_rq_1_1 = 200, - .hotplug_rq_2_0 = 200, - .max_freq = 600000, - .min_freq = 100000, - .up_threshold = 95, - .down_differential = 2, - .min_cpu_lock = 0, - .max_cpu_lock = 0, - .cpu_down_rate = 5, - .sampling_rate = 200000, - .io_is_busy = 0, - .boost_freq = 400000, - .boost_mincpus = 2, - .interaction_boost_time = 60 * (MS_TO_NS), - .launch_boost_time = 2000 * (MS_TO_NS), - }, - [PROFILE_BALANCED] = { - .hotplug_freq_1_1 = 600000, - .hotplug_freq_2_0 = 600000, - .hotplug_rq_1_1 = 150, - .hotplug_rq_2_0 = 150, - .min_freq = 200000, - .max_freq = -1, - .up_threshold = 90, - .down_differential = 3, - .min_cpu_lock = 0, - .max_cpu_lock = 0, - .cpu_down_rate = 10, - .sampling_rate = 200000, - .io_is_busy = 0, - .boost_freq = 1000000, - .boost_mincpus = 0, - .interaction_boost_time = 120 * (MS_TO_NS), - .launch_boost_time = 4000 * (MS_TO_NS), - }, - [PROFILE_PERFORMANCE] = { - .hotplug_freq_1_1 = 600000, - .hotplug_freq_2_0 = 400000, - .hotplug_rq_1_1 = 100, - .hotplug_rq_2_0 = 100, - .min_freq = 400000, - .max_freq = -1, - .up_threshold = 80, - .down_differential = 5, - .min_cpu_lock = 0, - .max_cpu_lock = 0, - .cpu_down_rate = 20, - .sampling_rate = 200000, - .io_is_busy = 1, - .boost_freq = 1000000, - .boost_mincpus = 2, - .interaction_boost_time = 180 * (MS_TO_NS), - .launch_boost_time = 6000 * (MS_TO_NS), - }, -}; - -// for non-interactive profiles we don't need to worry about -// boosting as it (should) only occur while the screen is on -static power_profile profiles_low_power[PROFILE_MAX] = { - [PROFILE_POWER_SAVE] = { - .hotplug_freq_1_1 = 800000, - .hotplug_freq_2_0 = 800000, - .hotplug_rq_1_1 = 200, - .hotplug_rq_2_0 = 200, - .max_freq = 800000, - .min_freq = -1, - .up_threshold = 95, - .down_differential = 1, - .min_cpu_lock = 0, - .max_cpu_lock = 1, - .cpu_down_rate = 5, - .sampling_rate = 200000, - .io_is_busy = 0, - .boost_freq = 0, - .boost_mincpus = 0, - .interaction_boost_time = 0, - .launch_boost_time = 0, - }, - [PROFILE_BALANCED] = { - .hotplug_freq_1_1 = 800000, - .hotplug_freq_2_0 = 800000, - .hotplug_rq_1_1 = 150, - .hotplug_rq_2_0 = 150, - .max_freq = -1, - .min_freq = -1, - .up_threshold = 90, - .down_differential = 2, - .min_cpu_lock = 0, - .max_cpu_lock = 0, - .cpu_down_rate = 8, - .sampling_rate = 200000, - .io_is_busy = 0, - .boost_freq = 0, - .boost_mincpus = 0, - .interaction_boost_time = 0, - .launch_boost_time = 0, - }, - [PROFILE_PERFORMANCE] = { - .hotplug_freq_1_1 = 800000, - .hotplug_freq_2_0 = 400000, - .hotplug_rq_1_1 = 100, - .hotplug_rq_2_0 = 100, - .min_freq = -1, - .max_freq = -1, - .up_threshold = 85, - .down_differential = 5, - .min_cpu_lock = 0, - .max_cpu_lock = 0, - .cpu_down_rate = 15, - .sampling_rate = 200000, - .io_is_busy = 1, - .boost_freq = 0, - .boost_mincpus = 0, - .interaction_boost_time = 0, - .launch_boost_time = 0, - }, -}; +#define GOV_BALANCED "ondemand" +#define GOV_HIGH_PERFORMANCE "performance" diff --git a/rootdir/init.smdk4210.rc b/rootdir/init.smdk4210.rc index fc32ba0..e49c680 100644 --- a/rootdir/init.smdk4210.rc +++ b/rootdir/init.smdk4210.rc @@ -303,31 +303,6 @@ on post-fs-data chown radio system /sys/devices/virtual/accelerometer/accelerometer/acc_file chown radio system /sys/devices/virtual/sec/gsensorcal/calibration -# Permissions for PegasusQ - chown system system /sys/devices/system/cpu/cpufreq/pegasusq - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_freq - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_lock_time - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_mincpus - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_freq - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_freq - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpucore_table - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/down_differential - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/dvfs_debug - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/freq_step - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1 - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0 - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1 - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0 - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/ignore_nice_load - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/io_is_busy - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/min_cpu_lock - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock - chown system system /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate - # for device encryption setprop vold.post_fs_data_done 1 |
