Merge "hwc: [8x26]Never allow primary get DMA pipe when external connect"

This commit is contained in:
Linux Build Service Account
2014-04-28 22:26:58 -07:00
committed by Gerrit - the friendly Code Review server
3 changed files with 9 additions and 12 deletions

View File

@@ -616,15 +616,6 @@ bool MDPComp::fullMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
ALOGD_IF(isDebug(), "%s: Unsupported layer in list",__FUNCTION__); ALOGD_IF(isDebug(), "%s: Unsupported layer in list",__FUNCTION__);
return false; return false;
} }
//For 8x26, if there is only one layer which needs scale for secondary
//while no scale for primary display, DMA pipe is occupied by primary.
//If need to fall back to GLES composition, virtual display lacks DMA
//pipe and error is reported.
if(qdutils::MDPVersion::getInstance().is8x26() &&
mDpy >= HWC_DISPLAY_EXTERNAL &&
qhwc::needsScaling(layer))
return false;
} }
mCurrentFrame.fbCount = 0; mCurrentFrame.fbCount = 0;
@@ -1412,6 +1403,7 @@ bool MDPCompNonSplit::allocLayerPipes(hwc_context_t *ctx,
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].xres > 1024); ctx->dpyAttr[HWC_DISPLAY_PRIMARY].xres > 1024);
pipeSpecs.dpy = mDpy; pipeSpecs.dpy = mDpy;
pipeSpecs.fb = false; pipeSpecs.fb = false;
pipeSpecs.numActiveDisplays = ctx->numActiveDisplays;
pipe_info.index = ctx->mOverlay->getPipe(pipeSpecs); pipe_info.index = ctx->mOverlay->getPipe(pipeSpecs);

View File

@@ -203,7 +203,9 @@ utils::eDest Overlay::getPipe_8x26(const PipeSpecs& pipeSpecs) {
if(pipeSpecs.formatClass == FORMAT_YUV) { //video if(pipeSpecs.formatClass == FORMAT_YUV) { //video
return nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); return nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer);
} else if(pipeSpecs.fb == false) { //RGB app layers } else if(pipeSpecs.fb == false) { //RGB app layers
if(not pipeSpecs.needsScaling) { if((not pipeSpecs.needsScaling) and
(not (pipeSpecs.numActiveDisplays > 1 &&
pipeSpecs.dpy == DPY_PRIMARY))) {
dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer); dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer);
} }
if(dest == OV_INVALID) { if(dest == OV_INVALID) {
@@ -220,7 +222,9 @@ utils::eDest Overlay::getPipe_8x26(const PipeSpecs& pipeSpecs) {
dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer);
} }
} }
if(dest == OV_INVALID and (not pipeSpecs.needsScaling)) { if(dest == OV_INVALID and (not pipeSpecs.needsScaling) and
(not (pipeSpecs.numActiveDisplays > 1 &&
pipeSpecs.dpy == DPY_PRIMARY))) {
dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer); dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer);
} }
} }

View File

@@ -57,12 +57,13 @@ public:
struct PipeSpecs { struct PipeSpecs {
PipeSpecs() : formatClass(FORMAT_RGB), needsScaling(false), fb(false), PipeSpecs() : formatClass(FORMAT_RGB), needsScaling(false), fb(false),
dpy(DPY_PRIMARY), mixer(MIXER_DEFAULT) {} dpy(DPY_PRIMARY), mixer(MIXER_DEFAULT), numActiveDisplays(1) {}
int formatClass; int formatClass;
bool needsScaling; bool needsScaling;
bool fb; bool fb;
int dpy; int dpy;
int mixer; int mixer;
int numActiveDisplays;
}; };
/* dtor close */ /* dtor close */