summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2012-11-22 07:21:51 +0000
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-12-03 19:27:25 +0100
commit94069f852e6f21dad89ea42f4a20ec044a9d3969 (patch)
tree2a20337cf440a18195b8547d583030b29882ff38
parentd44c7be104553c28f4bb92fb83fab2227cca25c5 (diff)
downloadnative-linaro_android_4.2.1_critical_fixes_only.tar.gz
surfaceflinger: Handle screen timeout on hw without vsynclinaro_android_4.2.1_critical_fixes_only
timeout currently at 1 second waiting for vsync. With this change timeout happens at 16ms. Change-Id: I785a2ff2bd15710c1b36466a298379adcf0ae936 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--services/surfaceflinger/EventThread.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index edb9fa5807..b56c3daada 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 @@ EventThread::EventThread(const sp<SurfaceFlinger>& flinger)
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_DISPLAY_TYPES_SUPPORTED ; i++) {
mVSyncEvent[i].header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC;
mVSyncEvent[i].header.id = 0;
@@ -108,6 +114,11 @@ void EventThread::onScreenAcquired() {
mUseSoftwareVSync = false;
mCondition.broadcast();
}
+
+ char value[PROPERTY_VALUE_MAX];
+ property_get("debug.sf.no_hw_vsync", value, "0");
+ if (1 == atoi(value))
+ mUseSoftwareVSync = true;
}