summaryrefslogtreecommitdiff
path: root/frameworks/native/native.git-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'frameworks/native/native.git-2.patch')
-rw-r--r--frameworks/native/native.git-2.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/frameworks/native/native.git-2.patch b/frameworks/native/native.git-2.patch
new file mode 100644
index 0000000..8efff07
--- /dev/null
+++ b/frameworks/native/native.git-2.patch
@@ -0,0 +1,52 @@
+From 95c7fb8f9c5a0843e7ec411920910484c0bd37bc Mon Sep 17 00:00:00 2001
+From: Vishal Bhoj <vishal.bhoj@linaro.org>
+Date: Thu, 25 Jul 2013 13:33:13 +0530
+Subject: [PATCH] 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>
+---
+ services/surfaceflinger/EventThread.cpp | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
+index 3528b62..b79c973 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>
+@@ -42,6 +43,11 @@ EventThread::EventThread(const sp<VSyncSource>& src)
+ mVsyncEnabled(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<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) {
+ mVSyncEvent[i].header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC;
+ mVSyncEvent[i].header.id = 0;
+@@ -109,6 +115,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;
+ }
+
+ void EventThread::onVSyncEvent(nsecs_t timestamp) {
+--
+1.7.9.5
+