surfaceflinger: Handle screen timeout on hw without vsync

timeout currently at 1 second waiting for vsync. With
this change timeout happens at 16ms.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index 4d0fc79..f00572c 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -20,6 +20,7 @@
 #include <sys/types.h>
 
 #include <cutils/compiler.h>
+#include <cutils/properties.h>
 
 #include <gui/BitTube.h>
 #include <gui/IDisplayEventConnection.h>
@@ -41,6 +42,11 @@
       mUseSoftwareVSync(false),
       mDebugVsyncEnabled(false) {
 
+    char value[PROPERTY_VALUE_MAX];
+    property_get("debug.sf.no_hw_vsync", value, "0");
+    if (1 == atoi(value))
+        mUseSoftwareVSync = true;
+
     for (int32_t i=0 ; i<HWC_NUM_DISPLAY_TYPES ; i++) {
         mVSyncEvent[i].header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC;
         mVSyncEvent[i].header.id = 0;
@@ -108,6 +114,11 @@
         mUseSoftwareVSync = false;
         mCondition.broadcast();
     }
+
+    char value[PROPERTY_VALUE_MAX];
+    property_get("debug.sf.no_hw_vsync", value, "0");
+    if (1 == atoi(value))
+        mUseSoftwareVSync = true;
 }