Merge "sdm: Add support for hybrid composition"
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 19514e6..33989a6 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -2903,6 +2903,10 @@
     if(src_w > (int) qdutils::MDPVersion::getInstance().getMaxPipeWidth()) {
         return;
     }
+    //H/w requirement for BWC only. Pipe can still support 4096
+    if(src_h > 4092) {
+        return;
+    }
     //Decimation necessary, cannot use BWC. H/W requirement.
     if(qdutils::MDPVersion::getInstance().supportsDecimation()) {
         uint8_t horzDeci = 0;
diff --git a/libqservice/IQService.h b/libqservice/IQService.h
index 00bf90e..16ea704 100644
--- a/libqservice/IQService.h
+++ b/libqservice/IQService.h
@@ -86,6 +86,7 @@
         DEBUG_PIPE_LIFECYCLE,
         DEBUG_DRIVER_CONFIG,
         DEBUG_ROTATOR,
+        DEBUG_QDCM,
     };
 
     enum {
diff --git a/sdm/libs/hwc/hwc_debugger.cpp b/sdm/libs/hwc/hwc_debugger.cpp
index 6cbce3e..a3b3cb0 100644
--- a/sdm/libs/hwc/hwc_debugger.cpp
+++ b/sdm/libs/hwc/hwc_debugger.cpp
@@ -85,6 +85,14 @@
   }
 }
 
+void HWCDebugHandler::DebugQdcm(bool enable) {
+  if (enable) {
+    SET_BIT(debug_flags_, kTagQDCM);
+  } else {
+    CLEAR_BIT(debug_flags_, kTagQDCM);
+  }
+}
+
 void HWCDebugHandler::Error(DebugTag /*tag*/, const char *format, ...) {
   va_list list;
   va_start(list, format);
diff --git a/sdm/libs/hwc/hwc_debugger.h b/sdm/libs/hwc/hwc_debugger.h
index 480db22..3386377 100644
--- a/sdm/libs/hwc/hwc_debugger.h
+++ b/sdm/libs/hwc/hwc_debugger.h
@@ -60,6 +60,7 @@
   static void DebugCompManager(bool enable);
   static void DebugDriverConfig(bool enable);
   static void DebugRotator(bool enable);
+  static void DebugQdcm(bool enable);
 
   virtual void Error(DebugTag tag, const char *format, ...);
   virtual void Warning(DebugTag tag, const char *format, ...);
diff --git a/sdm/libs/hwc/hwc_session.cpp b/sdm/libs/hwc/hwc_session.cpp
index 995b967..1d0c5f0 100644
--- a/sdm/libs/hwc/hwc_session.cpp
+++ b/sdm/libs/hwc/hwc_session.cpp
@@ -625,6 +625,10 @@
     HWCDebugHandler::DebugRotator(enable);
     break;
 
+  case qService::IQService::DEBUG_QDCM:
+    HWCDebugHandler::DebugQdcm(enable);
+    break;
+
   default:
     DLOGW("type = %d is not supported", type);
   }