summaryrefslogtreecommitdiffstats
path: root/modules/gralloc
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-07-13 14:30:48 -0700
committerMathias Agopian <mathias@google.com>2009-07-13 14:54:52 -0700
commit82aee243796ad9dd70426550f2eb07d1b7c1f8ff (patch)
tree43787293e1c578f112d64c200d960dd5fd99d37c /modules/gralloc
parentf5a22bcfa64f4f33b5877cd44761363af952b768 (diff)
downloadhardware_libhardware-82aee243796ad9dd70426550f2eb07d1b7c1f8ff.zip
hardware_libhardware-82aee243796ad9dd70426550f2eb07d1b7c1f8ff.tar.gz
hardware_libhardware-82aee243796ad9dd70426550f2eb07d1b7c1f8ff.tar.bz2
automatically detect update-on-demand
Diffstat (limited to 'modules/gralloc')
-rw-r--r--modules/gralloc/framebuffer.cpp10
1 files changed, 4 insertions, 6 deletions
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<int&>(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