hwc: Add error log to MDP Comp simulation failures

Add error log to MDP Comp Simulation failures when none of the mode
succeeds and hwc falls back to GPU. This is enabled only for primary
display.

Change-Id: Id449397a933a9670c9cae1f0d70ab700163b5e6b
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 0d968c8..5bf7e94 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -1772,13 +1772,15 @@
     }
 
     const int numLayers = ctx->listStats[mDpy].numAppLayers;
-
-    if(property_get("debug.hwc.simulate", property, NULL) > 0) {
-        int currentFlags = atoi(property);
-        if(currentFlags != sSimulationFlags) {
-            sSimulationFlags = currentFlags;
-            ALOGE("%s: Simulation Flag read: 0x%x (%d)", __FUNCTION__,
-                    sSimulationFlags, sSimulationFlags);
+    if(mDpy == HWC_DISPLAY_PRIMARY) {
+        sSimulationFlags = 0;
+        if(property_get("debug.hwc.simulate", property, NULL) > 0) {
+            int currentFlags = atoi(property);
+            if(currentFlags != sSimulationFlags) {
+                sSimulationFlags = currentFlags;
+                ALOGI("%s: Simulation Flag read: 0x%x (%d)", __FUNCTION__,
+                        sSimulationFlags, sSimulationFlags);
+            }
         }
     }
     // reset PTOR
@@ -1830,6 +1832,8 @@
             memset(&mCurrentFrame.drop, 0, sizeof(mCurrentFrame.drop));
             mCurrentFrame.dropCount = 0;
             ret = -1;
+            ALOGE_IF(sSimulationFlags && (mDpy == HWC_DISPLAY_PRIMARY),
+                    "MDP Composition Strategies Failed");
         }
     } else {
         ALOGD_IF( isDebug(),"%s: MDP Comp not possible for this frame",