hwc: Perform MDP downscaling for WFD/HDMI Scenario

  On WFD/HDMI connection, if the configured resolution is less than
  Primary Resolution, Display HAL does the following:

  1. sends hpd notification to SF with primary resolution.
  2. configures MDP pipes with configured Resolution.

  This is done to improve UI quality as MDP has better downscale
  filter options compared to GPU.
  This works only for QCOM WFD proprietary solution.

Change-Id: Ic20e837bf02c0f7b6718946e70b936f3a469fa7c
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index df1696d..3908816 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -83,6 +83,8 @@
     // To trigger padding round to clean up mdp
     // pipes
     bool isConfiguring;
+    // External Display is in MDP Downscale mode indicator
+    bool mDownScaleMode;
 };
 
 struct ListStats {
@@ -185,8 +187,12 @@
 
 bool isPrimaryPortrait(hwc_context_t *ctx);
 
+bool isOrientationPortrait(hwc_context_t *ctx);
+
 void calcExtDisplayPosition(hwc_context_t *ctx,
-                               int dpy, hwc_rect_t& displayFrame);
+                               int dpy,
+                               hwc_rect_t& sourceCrop,
+                               hwc_rect_t& displayFrame);
 
 //Close acquireFenceFds of all layers of incoming list
 void closeAcquireFds(hwc_display_contents_1_t* list);