diff options
Diffstat (limited to 'modules/gralloc/framebuffer.cpp')
-rw-r--r-- | modules/gralloc/framebuffer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp index 9d8513a2..486e27ab 100644 --- a/modules/gralloc/framebuffer.cpp +++ b/modules/gralloc/framebuffer.cpp @@ -42,6 +42,13 @@ /*****************************************************************************/ +// Set TARGET_USE_PAN_DISPLAY to true at compile time if the +// board uses FBIOPAN_DISPLAY to setup page flipping, otherwise +// default ioctl to do page-flipping is FBIOPUT_VSCREENINFO. +#ifndef USE_PAN_DISPLAY +#define USE_PAN_DISPLAY 0 +#endif + // numbers of buffers for page flipping #define NUM_BUFFERS 2 @@ -178,10 +185,15 @@ int mapFrameBufferLocked(struct private_module_t* module) uint32_t flags = PAGE_FLIP; +#if USE_PAN_DISPLAY + if (ioctl(fd, FBIOPAN_DISPLAY, &info) == -1) { + ALOGW("FBIOPAN_DISPLAY failed, page flipping not supported"); +#else if (ioctl(fd, FBIOPUT_VSCREENINFO, &info) == -1) { + ALOGW("FBIOPUT_VSCREENINFO failed, page flipping not supported"); +#endif info.yres_virtual = info.yres; flags &= ~PAGE_FLIP; - ALOGW("FBIOPUT_VSCREENINFO failed, page flipping not supported"); } if (info.yres_virtual < info.yres * 2) { |