sdm: Define feature flags for pipe

Define feature flags to indicate the features enabled on a SourcePipe,
as MDP driver expects SDM to set the appropriate MULTIRECT flags in a
mdp_input_layer.

CRs-Fixed: 1003688
Change-Id: I2a42558c982f312e012a1fe51141c786d968f029
diff --git a/sdm/include/private/hw_info_types.h b/sdm/include/private/hw_info_types.h
index 9a09da9..38ccf21 100644
--- a/sdm/include/private/hw_info_types.h
+++ b/sdm/include/private/hw_info_types.h
@@ -112,6 +112,12 @@
   kBlendFilterMax,
 };
 
+enum HWPipeFlags {
+  kIGC = 0x01,
+  kMultiRect = 0x02,
+  kMultiRectParallelMode = 0x04,
+};
+
 typedef std::map<HWSubBlockType, std::vector<LayerBufferFormat>> FormatsMap;
 
 struct HWDynBwLimitInfo {
@@ -389,7 +395,7 @@
   uint8_t vertical_decimation = 0;
   HWScaleData scale_data;
   uint32_t z_order = 0;
-  bool set_igc = false;
+  uint8_t flags = 0;
   bool valid = false;
 
   void Reset() { *this = HWPipeInfo(); }
diff --git a/sdm/libs/core/fb/hw_device.cpp b/sdm/libs/core/fb/hw_device.cpp
index 48560cb..c8b3f40 100644
--- a/sdm/libs/core/fb/hw_device.cpp
+++ b/sdm/libs/core/fb/hw_device.cpp
@@ -226,9 +226,15 @@
         SetRect(pipe_info->dst_roi, &mdp_layer.dst_rect);
         SetMDPFlags(layer, is_rotator_used, is_cursor_pipe_used, &mdp_layer.flags);
         SetCSC(layer.csc, &mdp_layer.color_space);
-        if (pipe_info->set_igc) {
+        if (pipe_info->flags & kIGC) {
           SetIGC(layer, mdp_layer_count);
         }
+        if (pipe_info->flags & kMultiRect) {
+          mdp_layer.flags |= MDP_LAYER_MULTIRECT_ENABLE;
+          if (pipe_info->flags & kMultiRectParallelMode) {
+            mdp_layer.flags |= MDP_LAYER_MULTIRECT_PARALLEL_MODE;
+          }
+        }
         mdp_layer.bg_color = layer.solid_fill_color;
 
         // HWScaleData to MDP driver