summaryrefslogtreecommitdiffstats
path: root/power-8992.c
diff options
context:
space:
mode:
Diffstat (limited to 'power-8992.c')
-rw-r--r--power-8992.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/power-8992.c b/power-8992.c
index 3a6c5d4..49e73c6 100644
--- a/power-8992.c
+++ b/power-8992.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;