hwc: fix dst calculations for right mixer

The calculations made for the right mixer was not correct,
fixed it for both FBUpdate and video usecases

Change-Id: Iff2c296321bce14b776731528fff6f1d255d829a
This commit is contained in:
Arun Kumar K.R
2013-03-18 17:31:50 -07:00
committed by Gerrit - the friendly Code Review server
parent 09a30f3423
commit 0e8efb8afd
2 changed files with 9 additions and 3 deletions

View File

@@ -228,12 +228,16 @@ bool FBUpdateHighRes::configure(hwc_context_t *ctx,
hwc_rect_t displayFrame = sourceCrop;
//For FB left, top will always be 0
//That should also be the case if using 2 mixers for single display
ovutils::Dim dpos(displayFrame.left,
ovutils::Dim dposL(displayFrame.left,
displayFrame.top,
(displayFrame.right - displayFrame.left) / 2,
displayFrame.bottom - displayFrame.top);
ov.setPosition(dpos, destL);
ov.setPosition(dpos, destR);
ov.setPosition(dposL, destL);
ovutils::Dim dposR(0,
displayFrame.top,
(displayFrame.right - displayFrame.left) / 2,
displayFrame.bottom - displayFrame.top);
ov.setPosition(dposR, destR);
ret = true;
if (!ov.commit(destL)) {

View File

@@ -798,6 +798,8 @@ int configureHighRes(hwc_context_t *ctx, hwc_layer_1_t *layer,
if(rDest != OV_INVALID) {
PipeArgs pargR(mdpFlagsR, whf, z, isFg,
static_cast<eRotFlags>(rotFlags));
tmp_dstR.right = tmp_dstR.right - tmp_dstR.left;
tmp_dstR.left = 0;
if(configMdp(ctx->mOverlay, pargR, orient,
tmp_cropR, tmp_dstR, rDest) < 0) {
ALOGE("%s: commit failed for right mixer config", __FUNCTION__);