diff options
| -rw-r--r-- | power-8084.c | 21 | ||||
| -rw-r--r-- | power-8916.c | 1 | ||||
| -rw-r--r-- | power-8974.c | 21 |
3 files changed, 26 insertions, 17 deletions
diff --git a/power-8084.c b/power-8084.c index e7d26e7..04f202c 100644 --- a/power-8084.c +++ b/power-8084.c @@ -48,7 +48,6 @@ #include "utils.h" static int first_display_off_hint; -extern int display_boost; int set_interactive_override(int on) { char governor[80]; @@ -65,21 +64,17 @@ int set_interactive_override(int on) { * We need to be able to identify the first display off hint * and release the current lock holder */ - if (display_boost) { - if (!first_display_off_hint) { - undo_initial_hint_action(); - first_display_off_hint = 1; - } - /* used for all subsequent toggles to the display */ - undo_hint_action(DISPLAY_STATE_HINT_ID_2); + if (!first_display_off_hint) { + undo_initial_hint_action(); + first_display_off_hint = 1; } + /* Used for all subsequent toggles to the display */ + undo_hint_action(DISPLAY_STATE_HINT_ID_2); } else { /* Display on */ - if (display_boost) { - int resource_values2[] = {CPUS_ONLINE_MIN_2}; - perform_hint_action(DISPLAY_STATE_HINT_ID_2, resource_values2, - sizeof(resource_values2) / sizeof(resource_values2[0])); - } + int resource_values2[] = {CPUS_ONLINE_MIN_2}; + perform_hint_action(DISPLAY_STATE_HINT_ID_2, resource_values2, + sizeof(resource_values2) / sizeof(resource_values2[0])); } return HINT_NONE; diff --git a/power-8916.c b/power-8916.c index 39f46e3..81d7be9 100644 --- a/power-8916.c +++ b/power-8916.c @@ -57,7 +57,6 @@ char scaling_min_freq[4][80] = {"sys/devices/system/cpu/cpu0/cpufreq/scaling_min "sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq"}; static int slack_node_rw_failed = 0; -int display_boost; /** * If target is 8916: diff --git a/power-8974.c b/power-8974.c index effc422..624534c 100644 --- a/power-8974.c +++ b/power-8974.c @@ -48,7 +48,22 @@ #include "utils.h" static int first_display_off_hint; -extern int display_boost; + +/** + * If target is 8974pro: + * return true + * else: + * return false + */ +static bool is_target_8974pro(void) { + static bool is_8974pro = false; + int soc_id; + + soc_id = get_soc_id(); + if (soc_id == 194 || (soc_id >= 208 && soc_id <= 218)) is_8974pro = true; + + return is_8974pro; +} int set_interactive_override(int on) { char governor[80]; @@ -65,7 +80,7 @@ int set_interactive_override(int on) { * We need to be able to identify the first display off hint * and release the current lock holder */ - if (display_boost) { + if (is_target_8974pro()) { if (!first_display_off_hint) { undo_initial_hint_action(); first_display_off_hint = 1; @@ -75,7 +90,7 @@ int set_interactive_override(int on) { } } else { /* Display on */ - if (display_boost) { + if (is_target_8974pro()) { int resource_values2[] = {CPUS_ONLINE_MIN_2}; perform_hint_action(DISPLAY_STATE_HINT_ID_2, resource_values2, sizeof(resource_values2) / sizeof(resource_values2[0])); |
