diff options
author | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-07-19 20:01:01 +0800 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-10-23 01:12:56 +0300 |
commit | c836c7344bfc3dd16a6aed674309575e0a23b0a9 (patch) | |
tree | 67f63874095fbd76d6e83bc6dadb947b1c40d59c /power-8974.c | |
parent | 85e00bf2ce6aa080a42ad6f8dd47733b514cceac (diff) | |
download | vendor_qcom_opensource_power-c836c7344bfc3dd16a6aed674309575e0a23b0a9.tar.gz vendor_qcom_opensource_power-c836c7344bfc3dd16a6aed674309575e0a23b0a9.tar.bz2 vendor_qcom_opensource_power-c836c7344bfc3dd16a6aed674309575e0a23b0a9.zip |
power: Add back display_boost checks
- Remove 8084 check as all 8084s make use of the display boost
- Convert the display_boost check to an soc_id check for 8974pro
- Add back display_boost (now soc_id) check to 8974's HAL
Change-Id: I237b9108e666f4cb0051d1c1bb22453d55ffcdc7
Diffstat (limited to 'power-8974.c')
-rw-r--r-- | power-8974.c | 21 |
1 files changed, 18 insertions, 3 deletions
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])); |