overlay: Support for returning pipe based on capability

Add support for returning pipes based on capabilities.
getPipe() API takes in pipe specifications like format class,
scaling, display, mixer, fb and decides what pipe to return.
The nextPipe() API is now just a private helper.

Change-Id: I0ab809662c0ad6297e19a44f39264ee929944d13
This commit is contained in:
Saurabh Shah
2014-03-05 14:28:26 -08:00
committed by Gerrit - the friendly Code Review server
parent 8118d4b5b9
commit c62f39861a
6 changed files with 207 additions and 120 deletions

View File

@@ -182,8 +182,12 @@ bool AssertiveDisplay::prepare(hwc_context_t *ctx,
return false;
}
ovutils::eDest dest = ctx->mOverlay->nextPipe(ovutils::OV_MDP_PIPE_VG,
overlay::Overlay::DPY_WRITEBACK, Overlay::MIXER_DEFAULT);
Overlay::PipeSpecs pipeSpecs;
pipeSpecs.formatClass = Overlay::FORMAT_YUV;
pipeSpecs.dpy = overlay::Overlay::DPY_WRITEBACK;
pipeSpecs.fb = false;
ovutils::eDest dest = ctx->mOverlay->getPipe(pipeSpecs);
if(dest == OV_INVALID) {
ALOGE("%s failed: No VG pipe available", __func__);
mDoable = false;