hwc: move enable disable ioctls to vsync thread
This patch stabilized the vsync signal.
Bug: 7274951
Change-Id: Ieb6396c67d4dfb20cfde39a63a45ab6742d9ec5b
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 920902e..a03f4cd 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -174,15 +174,8 @@
case HWC_EVENT_VSYNC:
if (ctx->vstate.enable == enabled)
break;
- if(ioctl(ctx->dpyAttr[dpy].fd, MSMFB_OVERLAY_VSYNC_CTRL,
- &enabled) < 0) {
- ALOGE("%s: vsync control failed. Dpy=%d, enabled=%d : %s",
- __FUNCTION__, dpy, enabled, strerror(errno));
- ret = -errno;
- }
ctx->vstate.enable = !!enabled;
- if (enabled)
- pthread_cond_signal(&ctx->vstate.cond);
+ pthread_cond_signal(&ctx->vstate.cond);
ALOGD_IF (VSYNC_DEBUG, "VSYNC state changed to %s",
(enabled)?"ENABLED":"DISABLED");
break;