diff options
author | Kyle Repinski <repinski23@gmail.com> | 2014-11-27 17:53:09 -0600 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2014-12-13 00:39:24 +0100 |
commit | 82162d35709e02e9679a540743c5b6b05d36bced (patch) | |
tree | e48d89cb6798fc0a062b2e182cc8a64290c0c199 | |
parent | 68b7f3c40c78d60ffc654e82ce433def7028721a (diff) | |
download | device_samsung_tuna-82162d35709e02e9679a540743c5b6b05d36bced.zip device_samsung_tuna-82162d35709e02e9679a540743c5b6b05d36bced.tar.gz device_samsung_tuna-82162d35709e02e9679a540743c5b6b05d36bced.tar.bz2 |
hwc: Add option to ignore fb1.
With Lollipop, HWC 1.0 and secondary displays don't play well together.
So we might as well just disable it and save 16MB of RAM.
Conflicts:
BoardConfig.mk
-rwxr-xr-x | BoardConfig.mk | 2 | ||||
-rwxr-xr-x | hwc/Android.mk | 4 | ||||
-rwxr-xr-x | hwc/hwc.c | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index 700b1e3..d91340b 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -80,6 +80,8 @@ SGX_MODULES: TARGET_KERNEL_MODULES += SGX_MODULES +TARGET_TI_HWC_HDMI_DISABLED := true + # TI Enhancement Settings (Part 2) ifdef BOARD_USE_TI_ENHANCED_DOMX BOARD_USE_TI_DUCATI_H264_PROFILE := true diff --git a/hwc/Android.mk b/hwc/Android.mk index 2f46435..3761813 100755 --- a/hwc/Android.mk +++ b/hwc/Android.mk @@ -31,6 +31,10 @@ LOCAL_MODULE := hwcomposer.$(TARGET_BOOTLOADER_BOARD_NAME) LOCAL_CFLAGS := -DLOG_TAG=\"ti_hwc\" LOCAL_C_INCLUDES += external/libpng external/zlib +ifeq ($(TARGET_TI_HWC_HDMI_DISABLED),true) + LOCAL_CFLAGS += -DHDMI_DISABLED +endif + LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/../edid/inc \ $(LOCAL_PATH)/../include @@ -2566,12 +2566,14 @@ static int hwc_device_open(const hw_module_t* module, const char* name, hw_devic ALOGI("Primary display is HDMI"); hwc_dev->on_tv = 1; } else { +#ifndef HDMI_DISABLED hwc_dev->hdmi_fb_fd = open("/dev/graphics/fb1", O_RDWR); if (hwc_dev->hdmi_fb_fd < 0) { ALOGE("failed to open hdmi fb (%d)", errno); err = -errno; goto done; } +#endif } set_primary_display_transform_matrix(hwc_dev); |