From 40a95bd7262953ddcab73c671d145b74a72a3fe8 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Mon, 17 Sep 2012 11:06:56 -0700 Subject: [PATCH] gralloc: Don't use FB metadata on gimpy targets * If a device doesn't support VSYNC, it probably doesn't support FB metadata ioctl. Add an ifdef around it. Change-Id: I1bf788147129f7b9d584e22b914f1c59d2ee133b --- libgralloc/framebuffer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp index 9565127..c643e3b 100644 --- a/libgralloc/framebuffer.cpp +++ b/libgralloc/framebuffer.cpp @@ -270,6 +270,7 @@ int mapFrameBufferLocked(struct private_module_t* module) uint32_t line_length = (info.xres * info.bits_per_pixel / 8); info.yres_virtual = (size * numberOfBuffers) / line_length; +#ifndef NO_HW_VSYNC struct msmfb_metadata metadata; metadata.op = metadata_op_base_blend; @@ -278,6 +279,7 @@ int mapFrameBufferLocked(struct private_module_t* module) if(ioctl(fd, MSMFB_METADATA_SET, &metadata) == -1) { ALOGW("MSMFB_METADATA_SET failed to configure alpha mode"); } +#endif uint32_t flags = PAGE_FLIP; if (ioctl(fd, FBIOPUT_VSCREENINFO, &info) == -1) {