diff options
author | Chris Fries <cfries@motorola.com> | 2014-10-27 11:52:18 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2014-11-17 20:54:45 -0800 |
commit | bc28a0d5a53cd2d8ab03764e5329d31e894a0cb4 (patch) | |
tree | 575a38556d14a9226c279b5f7ceac9ac083a3602 /power | |
parent | e53cb3c09ab75a455a82cd1dd9296daa1dc2167b (diff) | |
download | shamu-bc28a0d5a53cd2d8ab03764e5329d31e894a0cb4.tar.gz |
power: Disable boost_sync driver
Set /dev/cpuctl/apps/cpu.notify_on_migrate to zero and leave it at zero.
Results in measurable current drain savings for a variety of usecases.
Change-Id: Ie654bb9143133641e5c3b77f69677e4a4f609f76
Diffstat (limited to 'power')
-rw-r--r-- | power/power_shamu.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/power/power_shamu.c b/power/power_shamu.c index 3090483d..6beeef95 100644 --- a/power/power_shamu.c +++ b/power/power_shamu.c @@ -65,34 +65,6 @@ static void power_init(__attribute__((unused)) struct power_module *module) socket_init(); } -static void sync_thread(int off) -{ - int rc; - pid_t client; - char data[MAX_LENGTH]; - - if (client_sockfd < 0) { - ALOGE("%s: boost socket not created", __func__); - return; - } - - client = getpid(); - - if (!off) { - snprintf(data, MAX_LENGTH, "2:%d", client); - rc = sendto(client_sockfd, data, strlen(data), 0, - (const struct sockaddr *)&client_addr, sizeof(struct sockaddr_un)); - } else { - snprintf(data, MAX_LENGTH, "3:%d", client); - rc = sendto(client_sockfd, data, strlen(data), 0, - (const struct sockaddr *)&client_addr, sizeof(struct sockaddr_un)); - } - - if (rc < 0) { - ALOGE("%s: failed to send: %s", __func__, strerror(errno)); - } -} - static void coresonline(int off) { int rc; @@ -160,11 +132,9 @@ static void process_video_encode_hint(void *metadata) if (metadata) { if (!strncmp(metadata, STATE_ON, sizeof(STATE_ON))) { /* Video encode started */ - sync_thread(1); enc_boost(1); } else if (!strncmp(metadata, STATE_OFF, sizeof(STATE_OFF))) { /* Video encode stopped */ - sync_thread(0); enc_boost(0); } else if (!strncmp(metadata, STATE_HDR_ON, sizeof(STATE_HDR_ON))) { /* HDR usecase started */ @@ -253,10 +223,8 @@ static void power_set_interactive(__attribute__((unused)) struct power_module *m ALOGV("%s %s", __func__, (on ? "ON" : "OFF")); if (on) { coresonline(0); - sync_thread(0); touch_boost(); } else { - sync_thread(1); coresonline(1); } } |