hwc: vd: Add support for Dynamic Resolution Change (DRC)

1. Add support for Dynamic Resolution Change

We add support for DRC on virtual displays. This is achieved
by reading the width and height attributes that are set as
part of the buffer handle metadata.

For the WFD use cases, the WFD  MultiMedia framework will
update the width and height during DRC by using setMetaData
API with UPDATE_BUFFER_GEOMETRY. We then proceed to configure
WB with the new resolution for subsequent frames.

2. Update WB dump with output buffer format and resolution

Update WB dump with output buffer format and resolution. This is
helpful for debugging purposes.

Change-Id: I537277499041bffc7bfc5c6e3d024b67f80fce44
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 4858b3a..e670990 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -97,8 +97,8 @@
     // To trigger padding round to clean up mdp
     // pipes
     bool isConfiguring;
-    // External Display is in MDP Downscale mode indicator
-    bool mDownScaleMode;
+    // Indicates whether external/virtual display is in MDP scaling mode
+    bool mMDPScalingMode;
     // Ext dst Rect
     hwc_rect_t mDstRect;
     //Action safe attributes
@@ -445,21 +445,17 @@
 }
 
 static inline int getWidth(const private_handle_t* hnd) {
-    if(isYuvBuffer(hnd)) {
-        MetaData_t *metadata = reinterpret_cast<MetaData_t*>(hnd->base_metadata);
-        if(metadata && metadata->operation & UPDATE_BUFFER_GEOMETRY) {
-            return metadata->bufferDim.sliceWidth;
-        }
+    MetaData_t *metadata = reinterpret_cast<MetaData_t*>(hnd->base_metadata);
+    if(metadata && metadata->operation & UPDATE_BUFFER_GEOMETRY) {
+        return metadata->bufferDim.sliceWidth;
     }
     return hnd->width;
 }
 
 static inline int getHeight(const private_handle_t* hnd) {
-    if(isYuvBuffer(hnd)) {
-        MetaData_t *metadata = reinterpret_cast<MetaData_t*>(hnd->base_metadata);
-        if(metadata && metadata->operation & UPDATE_BUFFER_GEOMETRY) {
-            return metadata->bufferDim.sliceHeight;
-        }
+    MetaData_t *metadata = reinterpret_cast<MetaData_t*>(hnd->base_metadata);
+    if(metadata && metadata->operation & UPDATE_BUFFER_GEOMETRY) {
+        return metadata->bufferDim.sliceHeight;
     }
     return hnd->height;
 }