Merge branch 'LA.HB.1.3.9_1' into display.lnx.3.0-dev

Change-Id: I72aff6fecdf580de749f1fb6f91d346dc0f91448
CRs-Fixed: 1058446
diff --git a/common.mk b/common.mk
index 298e0bf..af72e7b 100644
--- a/common.mk
+++ b/common.mk
@@ -1,9 +1,14 @@
 #Common headers
 display_top := $(call my-dir)
 
+#Common C flags
+common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
+common_flags += -Wconversion -Wall -Werror -std=c++11
+
 use_hwc2 := false
 ifeq ($(TARGET_USES_HWC2), true)
     use_hwc2 := true
+    common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
 endif
 
 common_includes := $(display_top)/libqdutils
@@ -25,9 +30,6 @@
     LOCAL_CLANG := true
 endif
 
-#Common C flags
-common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
-common_flags += -Wconversion -Wall -Werror -std=c++11
 ifneq ($(TARGET_USES_GRALLOC1), true)
     common_flags += -isystem $(display_top)/libgralloc
 else