hwc: Don't permit rotator use under certain conditions
These include constrained targets, with external connected which could
lead to a scarcity of pipes. Furthermore owing to a scarcity of writeback
interfaces, even if pipes are available, we may not be able to still
use rotator.
Change-Id: Ie2fb4c1726f32addcace89c268a126abe0cddbe0
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index b88674f..a344bf3 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -514,9 +514,10 @@
/* Checks for conditions where YUV layers cannot be bypassed */
bool MDPComp::isYUVDoable(hwc_context_t* ctx, hwc_layer_1_t* layer) {
+ bool extAnimBlockFeature = mDpy && ctx->listStats[mDpy].isDisplayAnimating;
- if(isSkipLayer(layer) && mDpy == HWC_DISPLAY_PRIMARY) {
- ALOGE("%s: Unable to bypass skipped YUV", __FUNCTION__);
+ if(isSkipLayer(layer) && !extAnimBlockFeature) {
+ ALOGD_IF(isDebug(), "%s: Video marked SKIP dpy %d", __FUNCTION__, mDpy);
return false;
}