hwc: Use GPU Composition for 8x26 virtual dpy scaling case

For 8x26, if there is only one layer which needs scale for
secondary display, while no scale for primary display, DMA
pipe is occupied by primary. If layer changed and need to
fall back to GLES composition, virtual display lacks DMA
pipe and error is reported.

To avoid this case, use GPU composition for virtual display
scaling case on 8x26.

Change-Id: I42297a18006517532e30d1a01c67ff8ca187482a
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 7d4fa3e..8a56ca6 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -586,6 +586,15 @@
             ALOGD_IF(isDebug(), "%s: Unsupported layer in list",__FUNCTION__);
             return false;
         }
+
+        //For 8x26, if there is only one layer which needs scale for secondary
+        //while no scale for primary display, DMA pipe is occupied by primary.
+        //If need to fall back to GLES composition, virtual display lacks DMA
+        //pipe and error is reported.
+        if(qdutils::MDPVersion::getInstance().is8x26() &&
+                                mDpy >= HWC_DISPLAY_EXTERNAL &&
+                                qhwc::needsScaling(ctx, layer, mDpy))
+            return false;
     }
     mCurrentFrame.fbCount = 0;
     mCurrentFrame.fbZ = -1;