hwc: Trigger a padding round when DMA state changes

Earlier, for targets with #pipes less than 8, padding
round was not getting triggered when DMA state
changes from LINE to BLOCK Mode. Fix that now.

Change-Id: I46cb817fcf4e4027d5a7d20a8e887088ef6411b5
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index e2c4677..60398e1 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -554,6 +554,13 @@
     if(!isEnabled()) {
         ALOGD_IF(isDebug(),"%s: MDP Comp. not enabled.", __FUNCTION__);
         ret = false;
+    } else if (ctx->isDMAStateChanging) {
+        // Bail out if a padding round has been invoked in order to switch DMA
+        // state to block mode. We need this to cater for the case when a layer
+        // requires rotation in the current frame.
+        ALOGD_IF(isDebug(), "%s: padding round invoked to switch DMA state",
+                __FUNCTION__);
+        ret = false;
     } else if(ctx->mVideoTransFlag && isSecondaryConnected(ctx)) {
         //1 Padding round to shift pipes across mixers
         ALOGD_IF(isDebug(),"%s: MDP Comp. video transition padding round",
@@ -583,13 +590,6 @@
                      __FUNCTION__,mDpy);
             ret = false;
         }
-    } else if (ctx->isDMAStateChanging) {
-        // Bail out if a padding round has been invoked in order to switch DMA
-        // state to block mode. We need this to cater for the case when a layer
-        // requires rotation in the current frame.
-        ALOGD_IF(isDebug(), "%s: padding round invoked to switch DMA state",
-                __FUNCTION__);
-        return false;
     }
 
     return ret;