hwc: allow DMA pipe in BLOCK mode for virtual dpy
For portrait videos case on WFD, driver supports multiplexing
of DMA pipe in LINE and BLOCK mode.
Loosen the requirements to allow DMA pipe in block mode for
portrait case of virtual display.
Change-Id: I5821501f89b17bb2d29c425aee0a6c16b2a4783b
diff --git a/liboverlay/overlay.cpp b/liboverlay/overlay.cpp
index 9222af5..d9baadd 100644
--- a/liboverlay/overlay.cpp
+++ b/liboverlay/overlay.cpp
@@ -52,6 +52,7 @@
mDumpStr[0] = '\0';
initScalar();
+ setDMAMultiplexingSupported();
}
Overlay::~Overlay() {
@@ -117,8 +118,10 @@
(mPipeBook[i].mMixer == MIXER_UNUSED || //Free or same mixer
mPipeBook[i].mMixer == mixer) &&
PipeBook::isNotAllocated(i) && //Free pipe
- !(sDMAMode == DMA_BLOCK_MODE && //DMA pipe in Line mode
- PipeBook::getPipeType((eDest)i) == OV_MDP_PIPE_DMA)) {
+ ( (sDMAMultiplexingSupported && dpy) ||
+ !(sDMAMode == DMA_BLOCK_MODE && //DMA pipe in Line mode
+ PipeBook::getPipeType((eDest)i) == OV_MDP_PIPE_DMA)) ){
+ //DMA-Multiplexing is only supported for WB on 8x26
dest = (eDest)i;
PipeBook::setAllocation(i);
break;
@@ -458,6 +461,7 @@
Overlay* Overlay::sInstance = 0;
int Overlay::sDpyFbMap[DPY_MAX] = {0, -1, -1};
int Overlay::sDMAMode = DMA_LINE_MODE;
+bool Overlay::sDMAMultiplexingSupported = false;
int Overlay::sForceSetBitmap = 0;
int Overlay::PipeBook::NUM_PIPES = 0;
int Overlay::PipeBook::sPipeUsageBitmap = 0;