diff options
Diffstat (limited to 'hwcomposer/hwc.c')
-rw-r--r-- | hwcomposer/hwc.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/hwcomposer/hwc.c b/hwcomposer/hwc.c index b84ebcb..a5df41e 100644 --- a/hwcomposer/hwc.c +++ b/hwcomposer/hwc.c @@ -691,25 +691,21 @@ static void *hwc_hdmi_thread(void *data) } /* - * Vsync polling thread + * DRM event polling thread * We poll for drm events in this thread. drm events can be vblank and/or * page-flip events both occuring on Vsync. + * + * vsync_thread is a misnomer here, but we will keep it for legacy reasons. */ static void *hwc_vsync_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, i; setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY); struct pollfd pfds[1] = {{ .fd = hwc_dev->drm_fd, - .events = POLLIN, - .revents = POLLERR + .events = POLLIN }}; while (1) { @@ -721,17 +717,12 @@ static void *hwc_vsync_thread(void *data) ALOGI ("Event handler timeout"); continue; } - for (i = 0; i < ret; i++) { - if (pfds[i].fd == hwc_dev->drm_fd) { - // ALOGE("Received event on DRMFD!!!!"); - drmHandleEvent (hwc_dev->drm_fd, - &(hwc_dev->displays[HWC_DISPLAY_PRIMARY]->disp_link.evctx)); - } + if (pfds[0].revents & POLLIN) { + drmHandleEvent (hwc_dev->drm_fd, + &(hwc_dev->displays[HWC_DISPLAY_PRIMARY]->disp_link.evctx)); } } - return NULL; - } static void hwc_registerProcs(struct hwc_composer_device_1* dev, |