From 4c96994df0edd76b981d34776823681440f3b371 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Sat, 9 Jun 2018 16:16:19 +0300 Subject: power: Remove leftover support for ondemand governor Change-Id: Id4c2aa5efa7101535a7311e34529e0b90c7491f1 --- performance.h | 10 ---------- power-8084.c | 23 ----------------------- power-8974.c | 23 ----------------------- power-common.h | 1 - utils.h | 4 ---- 5 files changed, 61 deletions(-) diff --git a/performance.h b/performance.h index 5d3a08c..ace281b 100644 --- a/performance.h +++ b/performance.h @@ -124,16 +124,6 @@ enum SAMPLING_RATE_LVL { MS_20 = 0xBFD, }; -enum ONDEMAND_IO_BUSY_LVL { - IO_BUSY_OFF = 0xC00, - IO_BUSY_ON = 0xC01, -}; - -enum ONDEMAND_SAMPLING_DOWN_FACTOR_LVL { - SAMPLING_DOWN_FACTOR_1 = 0xD01, - SAMPLING_DOWN_FACTOR_4 = 0xD04, -}; - enum INTERACTIVE_TIMER_RATE_LVL { TR_MS_500 = 0xECD, TR_MS_100 = 0xEF5, diff --git a/power-8084.c b/power-8084.c index 677546c..f82283b 100644 --- a/power-8084.c +++ b/power-8084.c @@ -47,7 +47,6 @@ #include "power-common.h" #include "utils.h" -static int display_hint_sent; static int display_hint2_sent; static int first_display_off_hint; extern int display_boost; @@ -78,20 +77,6 @@ int set_interactive_override(int on) { display_hint2_sent = 1; } } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - int resource_values[] = {MS_500, SYNC_FREQ_600, OPTIMAL_FREQ_600, - THREAD_MIGRATION_SYNC_OFF}; - - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values, - sizeof(resource_values) / sizeof(resource_values[0])); - display_hint_sent = 1; - } - - return HINT_HANDLED; - } } else { /* Display on */ if (display_boost && display_hint2_sent) { @@ -100,14 +85,6 @@ int set_interactive_override(int on) { sizeof(resource_values2) / sizeof(resource_values2[0])); display_hint2_sent = 0; } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - - return HINT_HANDLED; - } } return HINT_NONE; diff --git a/power-8974.c b/power-8974.c index 9aa560b..6186818 100644 --- a/power-8974.c +++ b/power-8974.c @@ -47,7 +47,6 @@ #include "power-common.h" #include "utils.h" -static int display_hint_sent; static int display_hint2_sent; static int first_display_off_hint; extern int display_boost; @@ -78,20 +77,6 @@ int set_interactive_override(int on) { display_hint2_sent = 1; } } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - int resource_values[] = {MS_500, SYNC_FREQ_600, OPTIMAL_FREQ_600, - THREAD_MIGRATION_SYNC_OFF}; - - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values, - sizeof(resource_values) / sizeof(resource_values[0])); - display_hint_sent = 1; - } - - return HINT_HANDLED; - } } else { /* Display on */ if (display_boost && display_hint2_sent) { @@ -100,14 +85,6 @@ int set_interactive_override(int on) { sizeof(resource_values2) / sizeof(resource_values2[0])); display_hint2_sent = 0; } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - - return HINT_HANDLED; - } } return HINT_NONE; diff --git a/power-common.h b/power-common.h index 0d8e11f..d731039 100644 --- a/power-common.h +++ b/power-common.h @@ -37,7 +37,6 @@ extern "C" { #define SCALING_GOVERNOR_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" #define SCALING_MIN_FREQ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" -#define ONDEMAND_GOVERNOR "ondemand" #define INTERACTIVE_GOVERNOR "interactive" #define SCHEDUTIL_GOVERNOR "schedutil" diff --git a/utils.h b/utils.h index c86e15c..d5037cf 100644 --- a/utils.h +++ b/utils.h @@ -35,10 +35,6 @@ int get_scaling_governor(char governor[], int size); int get_scaling_governor_check_cores(char governor[], int size, int core_num); int is_interactive_governor(char*); -void vote_ondemand_io_busy_off(); -void unvote_ondemand_io_busy_off(); -void vote_ondemand_sdf_low(); -void unvote_ondemand_sdf_low(); void perform_hint_action(int hint_id, int resource_values[], int num_resources); void undo_hint_action(int hint_id); void undo_initial_hint_action(); -- cgit v1.2.3