diff options
author | Iliyan Malchev <malchev@google.com> | 2013-05-24 19:34:16 +0000 |
---|---|---|
committer | The Android Automerger <android-build@android.com> | 2013-05-24 13:28:08 -0700 |
commit | d41c44c07c7b89ccceee3493220a9da689af4b66 (patch) | |
tree | 0cb996b63abcfe07120bd3e6f3cc9977115b69a4 | |
parent | 54617c959f4ba2bf799d80947353d5276660ba1e (diff) | |
download | power-d41c44c07c7b89ccceee3493220a9da689af4b66.tar.gz |
Revert "add coreboost feature and enable it when display is on"android-4.3_r2android-4.3_r1.1android-4.3_r1android-4.3_r0.9.1android-4.3_r0.9jb-mr2-release
This reverts commit d9de16eb13b5a295b555bc29ec58c517139f736e
Causes 15% power regression in on-screen tests on mako. This will revert it for Flo as well.
Change-Id: Ib7cd0bf6e225fbdc8c800f5d55a087f1fc2704eb
-rw-r--r-- | power.c | 30 |
1 files changed, 3 insertions, 27 deletions
@@ -27,7 +27,7 @@ #include <hardware/hardware.h> #include <hardware/power.h> -#define BOOST_SOCKET "/dev/socket/mpdecision/boost" +#define TOUCHBOOST_SOCKET "/dev/socket/mpdecision/touchboost" static int client_sockfd; static struct sockaddr_un client_addr; @@ -42,7 +42,7 @@ static void power_init(struct power_module *module) } memset(&client_addr, 0, sizeof(struct sockaddr_un)); client_addr.sun_family = AF_UNIX; - snprintf(client_addr.sun_path, UNIX_PATH_MAX, BOOST_SOCKET); + snprintf(client_addr.sun_path, UNIX_PATH_MAX, TOUCHBOOST_SOCKET); } static void touch_boost() @@ -60,35 +60,11 @@ static void touch_boost() } } -static void core_boost(int on) -{ - int rc; - - if (client_sockfd < 0) { - ALOGE("%s: touchboost socket not created", __func__); - return; - } - - if (!on) { - rc = sendto(client_sockfd, "2", 1, 0, (const struct sockaddr *)&client_addr, sizeof(struct sockaddr_un)); - } else { - rc = sendto(client_sockfd, "3", 1, 0, (const struct sockaddr *)&client_addr, sizeof(struct sockaddr_un)); - } - - if (rc < 0) { - ALOGE("%s: failed to send: %s", __func__, strerror(errno)); - } -} - static void power_set_interactive(struct power_module *module, int on) { ALOGV("%s %s", __func__, (on ? "ON" : "OFF")); - if (on) { - core_boost(1); + if (on) touch_boost(); - } else { - core_boost(0); - } } static void power_hint(struct power_module *module, power_hint_t hint, |