hwc/copybit: Use gpu composition for plane alpha

MDP3 doesn't support plane alpha. So falling back to
gpu whenever there is plane alpha in the list of layers.

Change-Id: Iec40e5160f4320b7393d937444645d1a243bd83b
diff --git a/libhwcomposer/hwc_copybit.cpp b/libhwcomposer/hwc_copybit.cpp
index ee06443..a701eb6 100644
--- a/libhwcomposer/hwc_copybit.cpp
+++ b/libhwcomposer/hwc_copybit.cpp
@@ -166,7 +166,10 @@
     private_handle_t *fbHnd = (private_handle_t *)fbLayer->handle;
 
 
-    // Avoid issue with mdp3 and rotation by using gpu composition
+    // Following are MDP3 limitations for which we
+    // need to fallback to GPU composition:
+    // 1. HW issues with mdp3 and rotation.
+    // 2. Plane alpha is not supported by MDP3.
     if (qdutils::MDPVersion::getInstance().getMDPVersion() < 400) {
         for (int i = ctx->listStats[dpy].numAppLayers-1; i >= 0 ; i--) {
             hwc_layer_1_t *layer = (hwc_layer_1_t *) &list->hwLayers[i];
@@ -175,6 +178,8 @@
                    ((layer->displayFrame.bottom - layer->displayFrame.top) % 16 ||
                    (layer->displayFrame.right - layer->displayFrame.left) % 16))
                 return true;
+            if (layer->planeAlpha != 0xFF)
+                return true;
         }
     }