summaryrefslogtreecommitdiffstats
path: root/power-8996.c
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2018-01-18 22:05:14 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:56 +0300
commit4e16643aba888a1cff432643aa2e22eeb93605b8 (patch)
treeeb43a82af2a9e7cf94c65c9736151e2313cd4b11 /power-8996.c
parent42cc4674d7333a37d463875f90a771d162fd7e7a (diff)
downloadvendor_qcom_opensource_power-4e16643aba888a1cff432643aa2e22eeb93605b8.tar.gz
vendor_qcom_opensource_power-4e16643aba888a1cff432643aa2e22eeb93605b8.tar.bz2
vendor_qcom_opensource_power-4e16643aba888a1cff432643aa2e22eeb93605b8.zip
power: Remove mutex to hints
* No longer needed. Change-Id: I09fc90b4e5399b3f3b8a409edf3f57361da90100
Diffstat (limited to 'power-8996.c')
-rw-r--r--power-8996.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/power-8996.c b/power-8996.c
index f8d4fe6..94bb1cd 100644
--- a/power-8996.c
+++ b/power-8996.c
@@ -47,7 +47,6 @@
#include "performance.h"
#include "power-common.h"
-pthread_mutex_t camera_hint_mutex = PTHREAD_MUTEX_INITIALIZER;
static int display_hint_sent;
static int camera_hint_ref_count;
@@ -101,25 +100,21 @@ static int process_video_encode_hint(void *metadata)
0x41420000, 0x5A, 0x41400100, 0x4, 0x41410100, 0x5F, 0x41414100, 0x22C, 0x41420100, 0x5A,
0x41810000, 0x9C4, 0x41814000, 0x32, 0x4180C000, 0x0, 0x41820000, 0xA};
- pthread_mutex_lock(&camera_hint_mutex);
camera_hint_ref_count++;
if (camera_hint_ref_count == 1) {
perform_hint_action(video_encode_metadata.hint_id,
resource_values, sizeof(resource_values)/sizeof(resource_values[0]));
}
- pthread_mutex_unlock(&camera_hint_mutex);
ALOGI("Video Encode hint start");
return HINT_HANDLED;
}
} else if (video_encode_metadata.state == 0) {
if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
- pthread_mutex_lock(&camera_hint_mutex);
camera_hint_ref_count--;
if (!camera_hint_ref_count) {
undo_hint_action(video_encode_metadata.hint_id);
}
- pthread_mutex_unlock(&camera_hint_mutex);
ALOGI("Video Encode hint stop");
return HINT_HANDLED;