hwc: Fix Pause/Resume issues
1. During PAUSE event, trigger an invalidate frame
which will unset the pipes (in draw call) and invoke
display commit as part of hwc_event thread.
This is required to avoid iommu page faults arising when
WFD encoder is in the middle of configuring buffers
and providing to Writeback as part of RESUME event and
Display HAL tries to invoke display commit as part of PAUSE.
2. Allow usage of rotator for Primary when WFD is in Pause
state.
The above changes are required to support secure/non-secure
video playback on HDCP WFD session and Pause/Resume.
Change-Id: I7391ae4cc7cd8b968873996a1a00fee5fbe6039c
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 4f3a098..35e724d 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -1298,7 +1298,8 @@
bool canUseRotator(hwc_context_t *ctx, int dpy) {
if(qdutils::MDPVersion::getInstance().is8x26() &&
- ctx->mVirtualDisplay->isConnected()) {
+ ctx->mVirtualDisplay->isConnected() &&
+ !ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].isPause) {
// Allow if YUV needs rotation and DMA is configured to BLOCK mode for
// primary. For portrait videos usecase on WFD, Driver supports
// multiplexing of DMA pipe in LINE and BLOCK mode.