Merge "hwc: Add error log to MDP Comp simulation failures"
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 5df0fa0..300a321 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -1771,13 +1771,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
@@ -1829,6 +1831,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",