hwc: Avoid MDPComp in certain conditions.

* Until now, it was the assumption that when display animation
is in progress and there is a video rotation involved, the yuv-layer
would be marked as skip till completion of display animation.
But this is not always the case.

* On low-end targets, there is a constraint on #VG-pipes and
during video playback, video on primary is composed using GPU
where as video on secondary is composed using MDP. When display
animation is in progress, in such usecase, ensure that MDP is
is completely avoided so that VG pipe is available to secondary
once display animation is done.

* On high-end targets, video on both primary and secondary are
composed using MDP due to sufficient VG pipes. When display
animation is in progress, in such usecase, ensure to skip
fullMDP and partialMDP composition strategies so that
VG pipe that was supposed to be available for secondary is not
used for RGB layers on primary.

Change-Id: I841de1d902b627dd6e625251bf384c38b2db816e
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index fb69fdd..039852e 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -525,6 +525,14 @@
         ALOGD_IF(isDebug(),"%s: MDP Comp. video transition padding round",
                 __FUNCTION__);
         ret = false;
+    } else if((qdutils::MDPVersion::getInstance().is8x26() ||
+               qdutils::MDPVersion::getInstance().is8x16() ||
+               qdutils::MDPVersion::getInstance().is8x39()) &&
+              !mDpy && isSecondaryAnimating(ctx) &&
+              isYuvPresent(ctx,HWC_DISPLAY_VIRTUAL)) {
+        ALOGD_IF(isDebug(),"%s: Display animation in progress",
+                 __FUNCTION__);
+        ret = false;
     } else if(qdutils::MDPVersion::getInstance().getTotalPipes() < 8) {
        /* TODO: freeing up all the resources only for the targets having total
                 number of pipes < 8. Need to analyze number of VIG pipes used
@@ -818,6 +826,14 @@
         return false;
     }
 
+    if(!mDpy && isSecondaryAnimating(ctx) &&
+       (isYuvPresent(ctx,HWC_DISPLAY_EXTERNAL) ||
+       isYuvPresent(ctx,HWC_DISPLAY_VIRTUAL)) ) {
+        ALOGD_IF(isDebug(),"%s: Display animation in progress",
+                 __FUNCTION__);
+        return false;
+    }
+
     // if secondary is configuring or Padding round, fall back to video only
     // composition and release all assigned non VIG pipes from primary.
     if(isSecondaryConfiguring(ctx)) {