summaryrefslogtreecommitdiffstats
path: root/power-8916.c
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2019-10-06 01:34:17 +0300
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:57 +0300
commit43b9e3524f90a59e59f4d6a1f0e7f6629e4d029f (patch)
treea5e102806cc781d39a35512d47c0b1a0781d3391 /power-8916.c
parent7af0fea40b41e90123908e0ea104f70dfc370edb (diff)
downloadvendor_qcom_opensource_power-43b9e3524f90a59e59f4d6a1f0e7f6629e4d029f.tar.gz
vendor_qcom_opensource_power-43b9e3524f90a59e59f4d6a1f0e7f6629e4d029f.tar.bz2
vendor_qcom_opensource_power-43b9e3524f90a59e59f4d6a1f0e7f6629e4d029f.zip
power: Clean up and fix set_interactive_override
* Remove debug logs and useless comments * Consistent return values * Add back display hints for legacy platforms, they used to live in power-common.c but removed in commit 561cffcbfa66192e839e040d2da3bff2ecf8dcac * Check if set_interactive_override handled hints and print info message if it didn't Change-Id: Iff9f7327ba71c282e34ff3143c45a3f40f72fc92
Diffstat (limited to 'power-8916.c')
-rw-r--r--power-8916.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/power-8916.c b/power-8916.c
index 422cb75..5625620 100644
--- a/power-8916.c
+++ b/power-8916.c
@@ -96,23 +96,20 @@ int set_interactive_override(int on) {
if (get_scaling_governor(governor, sizeof(governor)) == -1) {
ALOGE("Can't obtain scaling governor.");
- return HINT_HANDLED;
+ return HINT_NONE;
}
if (!on) {
- /* Display off. */
+ /* Display off */
if (is_target_8916()) {
if (is_interactive_governor(governor)) {
int resource_values[] = {TR_MS_50, THREAD_MIGRATION_SYNC_OFF};
-
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
ARRAY_SIZE(resource_values));
- } /* Perf time rate set for 8916 target*/
- /* End of display hint for 8916 */
+ }
} else {
if (is_interactive_governor(governor)) {
int resource_values[] = {TR_MS_CPU0_50, TR_MS_CPU4_50, THREAD_MIGRATION_SYNC_OFF};
-
/* Set CPU0 MIN FREQ to 400Mhz avoid extra peak power
impact in volume key press */
snprintf(tmp_str, NODE_MAX, "%d", MIN_FREQ_CPU0_DISP_OFF);
@@ -125,14 +122,12 @@ int set_interactive_override(int on) {
}
}
}
-
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
ARRAY_SIZE(resource_values));
- } /* Perf time rate set for CORE0,CORE4 8939 target*/
- /* End of display hint for 8939 */
+ }
}
} else {
- /* Display on. */
+ /* Display on */
if (is_target_8916()) {
if (is_interactive_governor(governor)) {
undo_hint_action(DISPLAY_STATE_HINT_ID);
@@ -152,7 +147,7 @@ int set_interactive_override(int on) {
}
undo_hint_action(DISPLAY_STATE_HINT_ID);
}
- } /* End of check condition during the DISPLAY ON case */
+ }
}
return HINT_HANDLED;
}