summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-12-30 02:20:21 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-12-30 02:20:21 +0000
commit77ddb6525b8a9323fcfff54fcbcb62820a8d540d (patch)
treee1f8e8a641fe1595497fdd033e2be62aa006dc79 /services
parent778777acb3567c51681bb29c3ca081694ae70969 (diff)
downloadframeworks_native-77ddb6525b8a9323fcfff54fcbcb62820a8d540d.zip
frameworks_native-77ddb6525b8a9323fcfff54fcbcb62820a8d540d.tar.gz
frameworks_native-77ddb6525b8a9323fcfff54fcbcb62820a8d540d.tar.bz2
ui/sf: Add support for exynos HDMI
Change-Id: I27b34e95c04750e3dd321a2183b6cc1d89f29b5d
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/Android.mk8
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp14
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h7
3 files changed, 28 insertions, 1 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 69c4e21..dac8467 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -57,6 +57,14 @@ LOCAL_SHARED_LIBRARIES := \
libui \
libgui
+ifeq ($(BOARD_USES_SAMSUNG_HDMI),true)
+ LOCAL_CFLAGS += -DSAMSUNG_HDMI_SUPPORT
+ LOCAL_SHARED_LIBRARIES += libTVOut libhdmiclient
+ LOCAL_C_INCLUDES += hardware/samsung/$(TARGET_BOARD_PLATFORM)/libhdmi/libhdmiservice
+ LOCAL_C_INCLUDES += hardware/samsung/$(TARGET_BOARD_PLATFORM)/include
+endif
+
+
LOCAL_MODULE:= libsurfaceflinger
include $(BUILD_SHARED_LIBRARY)
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index f97bcef..6d8f558 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -68,6 +68,9 @@
#include "DisplayHardware/GraphicBufferAlloc.h"
#include "DisplayHardware/HWComposer.h"
+#ifdef SAMSUNG_HDMI_SUPPORT
+#include "SecTVOutService.h"
+#endif
#define EGL_VERSION_HW_ANDROID 0x3143
@@ -121,6 +124,16 @@ SurfaceFlinger::SurfaceFlinger()
}
ALOGI_IF(mDebugRegion, "showupdates enabled");
ALOGI_IF(mDebugDDMS, "DDMS debugging enabled");
+
+#ifdef SAMSUNG_HDMI_SUPPORT
+ ALOGD(">>> Run service");
+ android::SecTVOutService::instantiate();
+#if defined(SAMSUNG_EXYNOS5250)
+ mHdmiClient = SecHdmiClient::getInstance();
+ mHdmiClient->setHdmiEnable(1);
+#endif
+#endif
+
}
void SurfaceFlinger::onFirstRef()
@@ -128,7 +141,6 @@ void SurfaceFlinger::onFirstRef()
mEventQueue.init(this);
run("SurfaceFlinger", PRIORITY_URGENT_DISPLAY);
-
// Wait for the main thread to be done with its initialization
mReadyToRunBarrier.wait();
}
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index b0d3bac..e8c4b9c 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -50,6 +50,10 @@
#include "DisplayHardware/HWComposer.h"
+#ifdef SAMSUNG_HDMI_SUPPORT
+#include "SecHdmiClient.h"
+#endif
+
namespace android {
// ---------------------------------------------------------------------------
@@ -458,6 +462,9 @@ private:
*/
sp<IBinder> mExtDisplayToken;
+#if defined(SAMSUNG_HDMI_SUPPORT) && defined(SAMSUNG_EXYNOS5250)
+ SecHdmiClient * mHdmiClient;
+#endif
};
// ---------------------------------------------------------------------------