Put HDMI code under compile time flag
Put HDMI code in HWC under compile time flag. This prevents crashes in use cases like HDMI used as primary. If not done, non-existing code in gralloc is called in that use case. Change-Id: Ic7e792acf0c35eb12f04a74405619385d7288991
This commit is contained in:
parent
ea1c22ccde
commit
ae67b6bd33
@ -16,5 +16,8 @@ LOCAL_C_INCLUDES += hardware/msm7k/libgralloc-qsd8k
|
||||
LOCAL_C_INCLUDES += hardware/msm7k/liboverlay
|
||||
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
|
||||
ifeq ($(TARGET_HAVE_HDMI_OUT),true)
|
||||
LOCAL_CFLAGS += -DHDMI_DUAL_DISPLAY
|
||||
endif
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
@ -127,6 +127,7 @@ static void dump_layer(hwc_layer_t const* l) {
|
||||
}
|
||||
|
||||
static void hwc_enableHDMIOutput(hwc_composer_device_t *dev, bool enable) {
|
||||
#if defined HDMI_DUAL_DISPLAY
|
||||
hwc_context_t* ctx = (hwc_context_t*)(dev);
|
||||
private_hwc_module_t* hwcModule = reinterpret_cast<private_hwc_module_t*>(
|
||||
dev->common.module);
|
||||
@ -148,10 +149,11 @@ static void hwc_enableHDMIOutput(hwc_composer_device_t *dev, bool enable) {
|
||||
fbDev->videoOverlayStarted(fbDev, false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int hwc_updateOverlayStatus(hwc_context_t* ctx, int layerType) {
|
||||
|
||||
#if defined HDMI_DUAL_DISPLAY
|
||||
private_hwc_module_t* hwcModule = reinterpret_cast<private_hwc_module_t*>(
|
||||
ctx->device.common.module);
|
||||
overlay::Overlay *ovLibObject = ctx->mOverlayLibObject;
|
||||
@ -180,6 +182,7 @@ static int hwc_updateOverlayStatus(hwc_context_t* ctx, int layerType) {
|
||||
ovLibObject->closeChannel();
|
||||
fbDev->videoOverlayStarted(fbDev, false);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user