summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Mahaveer <vishalm@ti.com>2015-02-17 15:03:47 -0600
committerGerrit Code Review <gerrit2@git.omapzoom.org>2015-02-17 15:04:49 -0600
commitb03c96692fd6ac9a259a66fe0dfa80c6e71fd2c5 (patch)
tree6e87962b18524ab91fb341395f72d9e1dab23fb2
parent0fe3995ec7a4ff98673e69482cac6ec97ae1d339 (diff)
downloaddra7xx-b03c96692fd6ac9a259a66fe0dfa80c6e71fd2c5.tar.gz
Revert "HWComposer: Ported HDMI HPD functionality, but using the EXTCON facility."
This reverts commit 88c52ea644eafd6fd32e32190b76481afc5e5ce0. Change-Id: I4d62413a5ee18eaa3ff83b6bd2d3318720188236
-rw-r--r--hwcomposer/Android.mk2
-rw-r--r--hwcomposer/hwc.c73
-rw-r--r--hwcomposer/hwc_dev.h3
3 files changed, 2 insertions, 76 deletions
diff --git a/hwcomposer/Android.mk b/hwcomposer/Android.mk
index 48736e8..9f96847 100644
--- a/hwcomposer/Android.mk
+++ b/hwcomposer/Android.mk
@@ -7,7 +7,7 @@ include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false
LOCAL_ARM_MODE := arm
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/../vendor/lib/hw
-LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libhardware libhardware_legacy libdrm libdrm_omap
+LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libhardware libdrm libdrm_omap
LOCAL_CFLAGS += -DSUPPORT_ANDROID_MEMTRACK_HAL
diff --git a/hwcomposer/hwc.c b/hwcomposer/hwc.c
index 9761af7..6ccde76 100644
--- a/hwcomposer/hwc.c
+++ b/hwcomposer/hwc.c
@@ -554,71 +554,6 @@ static void handle_hotplug(omap_hwc_device_t *hwc_dev)
}
}
}
-static void handle_uevents(omap_hwc_device_t *hwc_dev, const char *buff, int len)
-{
- int dock;
- int hdmi;
- int vsync;
- int state = 0;
- uint64_t timestamp = 0;
- const char *s = buff;
-
- hdmi = !strcmp(s, "change@/devices/virtual/extcon/hdmi");
-
- if (!hdmi)
- return;
-
- s += strlen(s) + 1;
-
- while(*s) {
- if (!strncmp(s, "STATE=", strlen("STATE=")))
- state = atoi(s + strlen("STATE="));
-
- s += strlen(s) + 1;
- if (s - buff >= len)
- break;
- }
-
- hwc_dev->ext_disp_state = state == 1;
-
-
- handle_hotplug(hwc_dev);
-}
-
-static void *hwc_hdmi_thread(void *data)
-{
- omap_hwc_device_t *hwc_dev = data;
- static char uevent_desc[4096];
- struct pollfd fds[2];
- int invalidate = 0;
- int timeout;
- int err;
-
- setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY);
-
- uevent_init();
-
- fds[0].fd = uevent_get_fd();
- fds[0].events = POLLIN;
- fds[1].fd = hwc_dev->pipe_fds[0];
- fds[1].events = POLLIN;
-
- timeout = hwc_dev->idle ? hwc_dev->idle : -1;
-
- memset(uevent_desc, 0, sizeof(uevent_desc));
-
- do {
- err = poll(fds, hwc_dev->idle ? 2 : 1, timeout);
-
- if (fds[0].revents & POLLIN) {
- /* keep last 2 zeroes to ensure double 0 termination */
- int len = uevent_next_event(uevent_desc, sizeof(uevent_desc) - 2);
- handle_uevents(hwc_dev, uevent_desc, len);
- }
- } while (1);
-
- return NULL;
-}
static void hwc_registerProcs(struct hwc_composer_device_1* dev,
hwc_procs_t const* procs)
@@ -774,13 +709,7 @@ static int hwc_device_open(const hw_module_t* module, const char* name, hw_devic
property_get("debug.hwc.idle", value, "250");
hwc_dev->idle = atoi(value);
- if (pthread_create(&hwc_dev->hdmi_thread, NULL, hwc_hdmi_thread, hwc_dev))
- {
- ALOGE("failed to create HDMI listening thread (%d): %m", errno);
- err = -errno;
- goto done;
- }
-
+ handle_hotplug(hwc_dev);
ALOGI("open_device(rgb_order=%d nv12_only=%d)",
hwc_dev->flags_rgb_order, hwc_dev->flags_nv12_only);
diff --git a/hwcomposer/hwc_dev.h b/hwcomposer/hwc_dev.h
index 24b8046..a76797e 100644
--- a/hwcomposer/hwc_dev.h
+++ b/hwcomposer/hwc_dev.h
@@ -37,7 +37,6 @@ struct omap_hwc_device {
/* static data */
hwc_composer_device_1_t device;
pthread_mutex_t ctx_mutex;
- pthread_t hdmi_thread;
const hwc_procs_t *cb_procs;
const struct gralloc_module_t *gralloc;
@@ -49,8 +48,6 @@ struct omap_hwc_device {
int flags_nv12_only;
float upscaled_nv12_limit;
- int pipe_fds[2]; /* pipe to event thread */
-
int force_sgx;
int idle;