power: Remove mutex to hints

* No longer needed.

Change-Id: I09fc90b4e5399b3f3b8a409edf3f57361da90100
This commit is contained in:
dianlujitao
2018-01-18 22:05:14 +08:00
committed by Michael Bestas
parent cd6e36030a
commit 1c368078d1
7 changed files with 0 additions and 52 deletions

View File

@@ -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;