summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-11-04 18:46:11 -0700
committerMathias Agopian <mathias@google.com>2011-11-04 18:46:11 -0700
commit385977f6d6c4e76379df384d50695a10cb3757f2 (patch)
treeea58371969bdfca98f1ce3842f542ab2c5ee859a /services
parent60e2245b63c54c8776ef97ce4bccb4d1510f85f1 (diff)
downloadframeworks_native-385977f6d6c4e76379df384d50695a10cb3757f2.zip
frameworks_native-385977f6d6c4e76379df384d50695a10cb3757f2.tar.gz
frameworks_native-385977f6d6c4e76379df384d50695a10cb3757f2.tar.bz2
workaround to set the WM refresh rate to 48 Hz for tuna devices only
this is TEMPORARY until we can do this properly. Bug: 5572464 Change-Id: I6537706d636a83a4a50e2900d6b829dd89b6f245
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/Android.mk4
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.cpp11
2 files changed, 15 insertions, 0 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 61a8358..b916bd7 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -30,6 +30,10 @@ ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY -DNEVER_DEFAULT_TO_ASYNC_MODE
endif
+ifneq (,$(findstring $(TARGET_DEVICE),tuna toro maguro))
+ LOCAL_CFLAGS += -DREFRESH_RATE=48
+endif
+
LOCAL_SHARED_LIBRARIES := \
libcutils \
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index f4be168..329c052 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -141,6 +141,17 @@ void DisplayHardware::init(uint32_t dpy)
mDpiY = mNativeWindow->ydpi;
mRefreshRate = fbDev->fps;
+
+/* FIXME: this is a temporary HACK until we are able to report the refresh rate
+ * properly from the HAL. The WindowManagerService now relies on this value.
+ */
+#ifndef REFRESH_RATE
+ mRefreshRate = fbDev->fps;
+#else
+ mRefreshRate = REFRESH_RATE;
+#warning "refresh rate set via makefile to REFRESH_RATE"
+#endif
+
EGLint w, h, dummy;
EGLint numConfigs=0;
EGLSurface surface;