From 82aee243796ad9dd70426550f2eb07d1b7c1f8ff Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 13 Jul 2009 14:30:48 -0700 Subject: automatically detect update-on-demand --- modules/gralloc/framebuffer.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'modules/gralloc') diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp index 748c1b2..0aaa9da 100644 --- a/modules/gralloc/framebuffer.cpp +++ b/modules/gralloc/framebuffer.cpp @@ -44,9 +44,6 @@ // should be a build option #define SUPPORTS_UPDATE_ON_DEMAND 1 -// fb_fix_screeninfo::id returned on msm7k -#define MSM_DEV_FB_ID "msmfb" - // numbers of buffers for page flipping #define NUM_BUFFERS 2 @@ -372,9 +369,10 @@ int fb_device_open(hw_module_t const* module, const char* name, const_cast(dev->device.maxSwapInterval) = 1; #if SUPPORTS_UPDATE_ON_DEMAND - if (!strcmp(m->finfo.id, MSM_DEV_FB_ID)) { - dev->device.setUpdateRect = fb_setUpdateRect; - LOGD("msmfb driver detected, enabling UPDATE_ON_DEMAND"); + if (m->finfo.reserved[0] == 0x5444 && + m->finfo.reserved[1] == 0x5055) { + dev->device.setUpdateRect = fb_setUpdateRect; + LOGD("UPDATE_ON_DEMAND supported"); } #endif -- cgit v1.1