summaryrefslogtreecommitdiffstats
path: root/power-8084.c
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-06-26 21:29:34 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:56 +0300
commit85e00bf2ce6aa080a42ad6f8dd47733b514cceac (patch)
tree446e1b971b363adedd0ffc0e5e942a6bd07eaa0a /power-8084.c
parent71131ea4e0f0a05a51443571970e4f74cb14de65 (diff)
downloadvendor_qcom_opensource_power-85e00bf2ce6aa080a42ad6f8dd47733b514cceac.tar.gz
vendor_qcom_opensource_power-85e00bf2ce6aa080a42ad6f8dd47733b514cceac.tar.bz2
vendor_qcom_opensource_power-85e00bf2ce6aa080a42ad6f8dd47733b514cceac.zip
power: Simplify display_hint_sent
Check for whether the display hint has been sent at the start of the set_interactive() function in the common powerHAL. This gets rid of the need to replicate the same variable in every target-specific powerHAL that implements the set_interactive_override() function. Change-Id: If7dd11fcb578211f4f83847f9257232c4138ce53
Diffstat (limited to 'power-8084.c')
-rw-r--r--power-8084.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/power-8084.c b/power-8084.c
index f82283b..e7d26e7 100644
--- a/power-8084.c
+++ b/power-8084.c
@@ -47,7 +47,6 @@
#include "power-common.h"
#include "utils.h"
-static int display_hint2_sent;
static int first_display_off_hint;
extern int display_boost;
@@ -72,18 +71,14 @@ int set_interactive_override(int on) {
first_display_off_hint = 1;
}
/* used for all subsequent toggles to the display */
- if (!display_hint2_sent) {
- undo_hint_action(DISPLAY_STATE_HINT_ID_2);
- display_hint2_sent = 1;
- }
+ undo_hint_action(DISPLAY_STATE_HINT_ID_2);
}
} else {
/* Display on */
- if (display_boost && display_hint2_sent) {
+ 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]));
- display_hint2_sent = 0;
}
}