From 32dd0125d9ce93afce76510e9a5c979651324ccc Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Thu, 26 Jul 2012 13:10:55 -0700 Subject: [PATCH] hwc: Disable HW vsync for some targets 7x27A, 8x25 and 8x55 do not support HW vsync yet. This change checks for their MDP version and disables HW vsync on them. This change should be reverted once hardware vsync is available on these targets. Change-Id: I0cb884f571346b3595169cb4b3c01bbdb7ecaaee --- libhwcomposer/hwc.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp index ad0000c..442f8f6 100644 --- a/libhwcomposer/hwc.cpp +++ b/libhwcomposer/hwc.cpp @@ -204,7 +204,12 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, methods->eventControl = hwc_eventControl; dev->device.common.tag = HARDWARE_DEVICE_TAG; - dev->device.common.version = HWC_DEVICE_API_VERSION_0_3; + //XXX: This disables hardware vsync on 7x27A, 8x25 and 8x55 + // Fix when HW vsync is available on those targets + if(dev->mMDP.version < 410) + dev->device.common.version = 0; + else + dev->device.common.version = HWC_DEVICE_API_VERSION_0_3; dev->device.common.module = const_cast(module); dev->device.common.close = hwc_device_close; dev->device.prepare = hwc_prepare;