hwc: Add DMA pipe support in MDP composition.
This change adds support to MDP composition to use DMA pipes when
layer scaling is not needed. Also makes sure not to invoke
MDP rotator when DMA pipes are configured since MDP rotator will
expect both the DMA pipes to available for performing rotation.
In such cases, we let the first frame of rotated video frame to
fall back to FB.
Change-Id: I3c3697dd2713ce9b86ba1e23192ec5841abd25ec
diff --git a/libhwcomposer/hwc_video.cpp b/libhwcomposer/hwc_video.cpp
index 2166a5b..f09cc35 100644
--- a/libhwcomposer/hwc_video.cpp
+++ b/libhwcomposer/hwc_video.cpp
@@ -94,6 +94,13 @@
}
}
+ if((layer->transform & HWC_TRANSFORM_ROT_90) && ctx->mDMAInUse) {
+ ctx->mDMAInUse = false;
+ ALOGD_IF(VIDEO_DEBUG, "%s: Rotator not available since \
+ DMA Pipe(s) are in use",__FUNCTION__);
+ return false;
+ }
+
if(configure(ctx, layer)) {
markFlags(layer);
mModeOn = true;