summaryrefslogtreecommitdiffstats
path: root/power-8994.c
diff options
context:
space:
mode:
Diffstat (limited to 'power-8994.c')
-rw-r--r--power-8994.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/power-8994.c b/power-8994.c
index 7ad7d17..7a04722 100644
--- a/power-8994.c
+++ b/power-8994.c
@@ -74,8 +74,7 @@ static int process_video_encode_hint(void* metadata) {
}
if (video_encode_metadata.state == 1) {
- if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
- (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
+ if (is_interactive_governor(governor)) {
/* sched and cpufreq params
* hispeed freq - 768 MHz
* target load - 90
@@ -89,8 +88,7 @@ static int process_video_encode_hint(void* metadata) {
return HINT_HANDLED;
}
} else if (video_encode_metadata.state == 0) {
- if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
- (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
+ if (is_interactive_governor(governor)) {
undo_hint_action(video_encode_metadata.hint_id);
return HINT_HANDLED;
}
@@ -121,8 +119,7 @@ int set_interactive_override(int on) {
if (!on) {
/* Display off */
- if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
- (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
+ if (is_interactive_governor(governor)) {
int resource_values[] = {0x777}; /* 4+0 core config in display off */
if (!display_hint_sent) {
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
@@ -133,8 +130,7 @@ int set_interactive_override(int on) {
}
} else {
/* Display on */
- if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
- (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
+ if (is_interactive_governor(governor)) {
undo_hint_action(DISPLAY_STATE_HINT_ID);
display_hint_sent = 0;
return HINT_HANDLED;