diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2018-05-25 21:33:46 +0300 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-10-23 01:12:56 +0300 |
commit | c0c5b02c1fb92a59f3a285ad6183e28e4bad107a (patch) | |
tree | 29b8d12fe6dd71e4e5b105025d793b1990fce424 /power-8953.c | |
parent | c3942652f9d6d56e390223934ca7eb8a1ebd7d46 (diff) | |
download | vendor_qcom_opensource_power-c0c5b02c1fb92a59f3a285ad6183e28e4bad107a.tar.gz vendor_qcom_opensource_power-c0c5b02c1fb92a59f3a285ad6183e28e4bad107a.tar.bz2 vendor_qcom_opensource_power-c0c5b02c1fb92a59f3a285ad6183e28e4bad107a.zip |
power: Remove unused camera_hint_ref_count
* These were part of the commit that added mutex locks
for camera hints. We have now removed the locks so
this is no longer necessary
Change-Id: I38b91ce4e8fc811b8d9a04e6ec20521adde1b264
Diffstat (limited to 'power-8953.c')
-rw-r--r-- | power-8953.c | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/power-8953.c b/power-8953.c index ff1e323..38ee3cb 100644 --- a/power-8953.c +++ b/power-8953.c @@ -53,7 +53,6 @@ static int video_encode_hint_sent; -static int camera_hint_ref_count; static void process_video_encode_hint(void* metadata); static int display_fd; @@ -210,13 +209,10 @@ static void process_video_encode_hint(void* metadata) { 0x41440100, 0x5f, 0x4143c100, 0x40c, }; memcpy(resource_values, res, MIN_VAL(sizeof(resource_values), sizeof(res))); - camera_hint_ref_count++; - if (camera_hint_ref_count == 1) { - if (!video_encode_hint_sent) { - perform_hint_action(video_encode_metadata.hint_id, resource_values, - ARRAY_SIZE(res)); - video_encode_hint_sent = 1; - } + if (!video_encode_hint_sent) { + perform_hint_action(video_encode_metadata.hint_id, resource_values, + ARRAY_SIZE(res)); + video_encode_hint_sent = 1; } } else { /* sample_ms = 10mS */ @@ -225,13 +221,10 @@ static void process_video_encode_hint(void* metadata) { 0xa, }; memcpy(resource_values, res, MIN_VAL(sizeof(resource_values), sizeof(res))); - camera_hint_ref_count++; - if (camera_hint_ref_count == 1) { - if (!video_encode_hint_sent) { - perform_hint_action(video_encode_metadata.hint_id, resource_values, - ARRAY_SIZE(res)); - video_encode_hint_sent = 1; - } + if (!video_encode_hint_sent) { + perform_hint_action(video_encode_metadata.hint_id, resource_values, + ARRAY_SIZE(res)); + video_encode_hint_sent = 1; } } } else if (is_interactive_governor(governor)) { @@ -241,23 +234,16 @@ static void process_video_encode_hint(void* metadata) { 0x41430000, 0x1, 0x41434000, 0x1, 0x41424000, 0x28, }; memcpy(resource_values, res, MIN_VAL(sizeof(resource_values), sizeof(res))); - camera_hint_ref_count++; - if (camera_hint_ref_count == 1) { - if (!video_encode_hint_sent) { - perform_hint_action(video_encode_metadata.hint_id, resource_values, - ARRAY_SIZE(res)); - video_encode_hint_sent = 1; - } + if (!video_encode_hint_sent) { + perform_hint_action(video_encode_metadata.hint_id, resource_values, + ARRAY_SIZE(res)); + video_encode_hint_sent = 1; } } } else if (video_encode_metadata.state == 0) { if (is_interactive_governor(governor) || is_schedutil_governor(governor)) { - camera_hint_ref_count--; - if (!camera_hint_ref_count) { - undo_hint_action(video_encode_metadata.hint_id); - video_encode_hint_sent = 0; - } - return; + undo_hint_action(video_encode_metadata.hint_id); + video_encode_hint_sent = 0; } } return; |