diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index 61a835833..b916bd78d 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 f4be16838..329c05270 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;