hwc2: Add support for multiple displays

- Add support for an additional display which can be either a builtin
  display or pluggable display.
- Restructure HWCDisplayPrimary as HWCBuiltIn and HWCDisplayExternal
  as HWCDisplayPluggable.
- Refactor hotplug handling. Iterate through all pluggable displays,
  and check present connection status. Connect/disconnect a given
  display if connection status has changed.

CRs-Fixed: 2200594
Change-Id: Ibd2f93ddfbe72af58220691ad481469c8fdcbf86
diff --git a/common.mk b/common.mk
index c1b13ec..a620d06 100644
--- a/common.mk
+++ b/common.mk
@@ -3,7 +3,9 @@
 display_config_version := $(shell \
     if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/config/1.1" ];\
     then echo DISPLAY_CONFIG_1_1; fi)
-
+display_config_version := $(shell \
+    if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/config/1.2" ];\
+    then echo DISPLAY_CONFIG_1_2; fi)
 #Common C flags
 common_flags := -Wno-missing-field-initializers
 common_flags += -Wconversion -Wall -Werror -std=c++14
@@ -16,6 +18,9 @@
 ifeq ($(display_config_version), DISPLAY_CONFIG_1_1)
     common_flags += -DDISPLAY_CONFIG_1_1
 endif
+ifeq ($(display_config_version), DISPLAY_CONFIG_1_2)
+    common_flags += -DDISPLAY_CONFIG_1_2 -DDISPLAY_CONFIG_1_1
+endif
 
 ifeq ($(TARGET_USES_COLOR_METADATA), true)
     common_flags += -DUSE_COLOR_METADATA