diff options
author | nico <nicorg2529@gmail.com> | 2018-12-13 05:58:17 +0000 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-10-23 01:12:57 +0300 |
commit | 7075241133d606a11966eb9517bc727c4b7115ae (patch) | |
tree | 5391cd2cef4a01b29fc8e3b5b44bb1ea20d3a3ef /power-660.c | |
parent | 11a94e360a53939a0a66e67e0b975a9d47e115e1 (diff) | |
download | vendor_qcom_opensource_power-7075241133d606a11966eb9517bc727c4b7115ae.tar.gz vendor_qcom_opensource_power-7075241133d606a11966eb9517bc727c4b7115ae.tar.bz2 vendor_qcom_opensource_power-7075241133d606a11966eb9517bc727c4b7115ae.zip |
power: Find online CPU core and get scaling governor
Change-Id: I90aed1aaee8d3819d1de921674da924efd0a6c4f
Diffstat (limited to 'power-660.c')
-rw-r--r-- | power-660.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/power-660.c b/power-660.c index 7c274af..00d50c5 100644 --- a/power-660.c +++ b/power-660.c @@ -91,15 +91,9 @@ int set_interactive_override(int on) { ALOGI("Got set_interactive hint"); - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU0) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU1) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU2) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU3) == -1) { - ALOGE("Can't obtain scaling governor."); - return HINT_HANDLED; - } - } - } + if (get_scaling_governor(governor, sizeof(governor)) == -1) { + ALOGE("Can't obtain scaling governor."); + return HINT_HANDLED; } if (!on) { @@ -154,15 +148,9 @@ static void process_video_encode_hint(void* metadata) { ALOGI("Got process_video_encode_hint"); - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU0) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU1) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU2) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU3) == -1) { - ALOGE("Can't obtain scaling governor."); - // return HINT_HANDLED; - } - } - } + if (get_scaling_governor(governor, sizeof(governor)) == -1) { + ALOGE("Can't obtain scaling governor."); + // return HINT_HANDLED; } /* Initialize encode metadata struct fields. */ |