sdm: Wrap DISPLAY_TERTIARY around QTI_BSP
1. HWC_DISPLAY_TERTIARY is not defined in AOSP. Wrap DISPLAY_TERTIARY around
QTI_BSP.
2. Include common.mk for hwc make file.
CRs-Fixed: 966190
Change-Id: I7f68feeb6fb94fb4dd77e3c21be9c563925bc200
diff --git a/common.mk b/common.mk
index fb955a2..76c392a 100644
--- a/common.mk
+++ b/common.mk
@@ -36,6 +36,14 @@
common_deps :=
kernel_includes :=
+# Executed only on QCOM BSPs
+ifeq ($(TARGET_USES_QCOM_BSP),true)
+# Enable QCOM Display features
+ common_flags += -DQTI_BSP
+endif
+ifneq ($(call is-platform-sdk-version-at-least,18),true)
+ common_flags += -DANDROID_JELLYBEAN_MR1=1
+endif
ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
# This check is to pick the kernel headers from the right location.
# If the macro above is defined, we make the assumption that we have the kernel
diff --git a/libqdutils/display_config.h b/libqdutils/display_config.h
index 9ba60f2..05a7f29 100644
--- a/libqdutils/display_config.h
+++ b/libqdutils/display_config.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013 - 2016 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -47,10 +47,12 @@
// Use this enum to specify the dpy parameters where needed
enum {
- DISPLAY_PRIMARY = 0,
- DISPLAY_EXTERNAL,
- DISPLAY_TERTIARY,
- DISPLAY_VIRTUAL,
+ DISPLAY_PRIMARY = HWC_DISPLAY_PRIMARY,
+ DISPLAY_EXTERNAL = HWC_DISPLAY_EXTERNAL,
+#ifdef QTI_BSP
+ DISPLAY_TERTIARY = HWC_DISPLAY_TERTIARY,
+#endif
+ DISPLAY_VIRTUAL = HWC_DISPLAY_VIRTUAL,
};
// External Display states - used in setSecondaryDisplayStatus()