Skip to content

Commit

Permalink
display: HAL: FB pipe type select
Browse files Browse the repository at this point in the history
When disable mdpcomp,it will fail to select pipe type.

For wearable targets, secondary display is not applicable.
Try for DMA pipe for FB first, if FB does not have scaling.

Change-Id: Ib621dca2f383d2dd9a6916bc8ccf6408050f8a5b
Signed-off-by: l00212897 <[email protected]>
Signed-off-by: Uday Kishore Pasupuleti <[email protected]>
  • Loading branch information
WANG XING authored and Chenjie Luo committed Mar 3, 2016
1 parent ebcc7af commit 3e344bb
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions msm8226/liboverlay/overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,27 @@ utils::eDest Overlay::getPipe_8x26(const PipeSpecs& pipeSpecs) {
} else { //FB layer
//For 8x26 Secondary we use DMA always for FB for inline rotation
if(pipeSpecs.dpy == DPY_PRIMARY) {
dest = nextPipe(OV_MDP_PIPE_RGB, pipeSpecs.dpy, pipeSpecs.mixer);
if(dest == OV_INVALID) {
dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer);
/* For wearable targets, secondary display is not applicable
Try for DMA pipe for FB first, if FB does not have scaling*/
if (not pipeSpecs.needsScaling) {
dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer);
} else {
dest = nextPipe(OV_MDP_PIPE_RGB, pipeSpecs.dpy, pipeSpecs.mixer);
if (dest == OV_INVALID) {
// FB needs scaling, and RGB pipe is not available - try VG
dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer);
}
}
}
if(dest == OV_INVALID and (not pipeSpecs.needsScaling) and
(not (pipeSpecs.numActiveDisplays > 1 &&
pipeSpecs.dpy == DPY_PRIMARY))) {
(not (pipeSpecs.numActiveDisplays > 1 &&
pipeSpecs.dpy == DPY_PRIMARY))) {
dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer);
}
}
if (dest == OV_INVALID) {
ALOGE("%s - not able to allocate FB pipe", __func__);
}
return dest;
}

Expand Down

0 comments on commit 3e344bb

Please sign in to comment.