hwc: No idle fallback for single layers

There is no need to do idle fallback if there's only one layer
being composed.

Change-Id: I0a4e0c7af66b750c1ebd31779175168613a280ce
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 072eda3..f2cff45 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -684,9 +684,11 @@
     const int numAppLayers = ctx->listStats[mDpy].numAppLayers;
     int priDispW = ctx->dpyAttr[HWC_DISPLAY_PRIMARY].xres;
 
-    // No Idle fall back, if secure display or secure RGB layers are present
+    // No Idle fall back, if secure display or secure RGB layers are present or
+    // if there's only a single layer being composed
     if(sIdleFallBack && (!ctx->listStats[mDpy].secureUI &&
-                    !ctx->listStats[mDpy].secureRGBCount)) {
+                    !ctx->listStats[mDpy].secureRGBCount) &&
+                    (ctx->listStats[mDpy].numAppLayers != 1)) {
         ALOGD_IF(isDebug(), "%s: Idle fallback dpy %d",__FUNCTION__, mDpy);
         return false;
     }