Permalink
Browse files

Fix compile errors when using NO_HW_VSYNC

Change-Id: Id5436afc69e97abf8b48cc938f44ebd0f87b514b
  • Loading branch information...
1 parent ea9ba60 commit a931d028cc33d8bcea416e5e54812effafe3b7fe @arco committed Mar 24, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 libhwcomposer/hwc_vsync.cpp
@@ -82,12 +82,14 @@ static void *vsync_loop(void *param)
while (ctx->vstate.enable == false) {
if(enabled) {
int e = 0;
+#ifndef NO_HW_VSYNC
if(ioctl(m->framebuffer->fd, MSMFB_OVERLAY_VSYNC_CTRL,
&e) < 0) {
ALOGE("%s: vsync control failed for fb0 enabled=%d : %s",
__FUNCTION__, enabled, strerror(errno));
ret = -errno;
}
+#endif
if(fb1_vsync) {
ret = ctx->mExtDisplay->enableHDMIVsync(e);
}
@@ -99,12 +101,14 @@ static void *vsync_loop(void *param)
if (!enabled) {
int e = 1;
+#ifndef NO_HW_VSYNC
if(ioctl(m->framebuffer->fd, MSMFB_OVERLAY_VSYNC_CTRL,
&e) < 0) {
ALOGE("%s: vsync control failed for fb0 enabled=%d : %s",
__FUNCTION__, enabled, strerror(errno));
ret = -errno;
}
+#endif
if(fb1_vsync) {
ret = ctx->mExtDisplay->enableHDMIVsync(e);
}

3 comments on commit a931d02

mikeNG commented on a931d02 Mar 25, 2013

I'm getting this error when building with display-legacy for xperia 2011 msm7x30 phones:

hardware/qcom/display-legacy/libgralloc/gpu.cpp: In constructor 'gralloc::gpu_context_t::gpu_context_t(const private_module_t*, android::spgralloc::IAllocController)':
hardware/qcom/display-legacy/libgralloc/gpu.cpp:47:5: error: 'allocSize' was not declared in this scope

Owner

arco replied Mar 25, 2013

Thanks, that fixed the build

Please sign in to comment.