hwc/overlay: Introduce padding round between DMA modes.
Introduce a padding round between the DMA line and block modes. Do this based on whether DMA is actually being used, when block mode is first requested. This relieves the driver of doing an UNSET ahead of vsync which could cause blinks in all such transition scenarios. This approach should lead to smooth transitions for multiple targets with the exception of secure videos, where there could be a blink in any of the different approaches we use. Change-Id: Ibc0b8d284b5c6ed9291a7cfa7e7f221300a921e2
This commit is contained in:
@@ -333,6 +333,12 @@ bool MDPComp::isFrameDoable(hwc_context_t *ctx) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ctx->isPaddingRound) {
|
||||||
|
ctx->isPaddingRound = false;
|
||||||
|
ALOGD_IF(isDebug(), "%s: padding round",__FUNCTION__);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -344,6 +344,9 @@ void setListStats(hwc_context_t *ctx,
|
|||||||
yuvCount++;
|
yuvCount++;
|
||||||
|
|
||||||
if(layer->transform & HWC_TRANSFORM_ROT_90) {
|
if(layer->transform & HWC_TRANSFORM_ROT_90) {
|
||||||
|
if(ctx->mOverlay->isPipeTypeAttached(OV_MDP_PIPE_DMA)) {
|
||||||
|
ctx->isPaddingRound = true;
|
||||||
|
}
|
||||||
Overlay::setDMAMode(Overlay::DMA_BLOCK_MODE);
|
Overlay::setDMAMode(Overlay::DMA_BLOCK_MODE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,6 +273,8 @@ struct hwc_context_t {
|
|||||||
mutable Locker mExtSetLock;
|
mutable Locker mExtSetLock;
|
||||||
//Vsync
|
//Vsync
|
||||||
struct vsync_state vstate;
|
struct vsync_state vstate;
|
||||||
|
//Drawing round when we use GPU
|
||||||
|
bool isPaddingRound;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace qhwc {
|
namespace qhwc {
|
||||||
|
|||||||
@@ -124,6 +124,16 @@ eDest Overlay::nextPipe(eMdpPipeType type, int dpy) {
|
|||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Overlay::isPipeTypeAttached(eMdpPipeType type) {
|
||||||
|
for(int i = 0; i < PipeBook::NUM_PIPES; i++) {
|
||||||
|
if(type == PipeBook::getPipeType((eDest)i) &&
|
||||||
|
mPipeBook[i].mDisplay != PipeBook::DPY_UNUSED) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool Overlay::commit(utils::eDest dest) {
|
bool Overlay::commit(utils::eDest dest) {
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
int index = (int)dest;
|
int index = (int)dest;
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ public:
|
|||||||
static Overlay* getInstance();
|
static Overlay* getInstance();
|
||||||
/* Returns available ("unallocated") pipes for a display */
|
/* Returns available ("unallocated") pipes for a display */
|
||||||
int availablePipes(int dpy);
|
int availablePipes(int dpy);
|
||||||
|
/* Returns if any of the requested pipe type is attached to any of the
|
||||||
|
* displays
|
||||||
|
*/
|
||||||
|
bool isPipeTypeAttached(utils::eMdpPipeType type);
|
||||||
/* set the framebuffer index for external display */
|
/* set the framebuffer index for external display */
|
||||||
void setExtFbNum(int fbNum);
|
void setExtFbNum(int fbNum);
|
||||||
/* Returns framebuffer index of the current external display */
|
/* Returns framebuffer index of the current external display */
|
||||||
|
|||||||
Reference in New Issue
Block a user