hwc: wait for fb_post, PAN only if target has overlay.

Wait for fb_post, PAN only if target has overlay.

(cherry picked from commit c6e9a0aae817e75b4b5e20ef23edd02a0a627ccd)

Change-Id: I9696c122b3ce5abed2ae2adb9e5929d3664b3add
This commit is contained in:
Saurabh Shah 2012-09-10 11:39:45 -07:00 committed by Andrew Sutherland
parent da0c6f2126
commit 43dfffc8d6

View File

@ -182,14 +182,16 @@ static int hwc_set(hwc_composer_device_t *dev,
MDPComp::draw(ctx, list);
}
eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur);
wait4fbPost(ctx);
//Can draw to HDMI only when fb_post is reached
UIMirrorOverlay::draw(ctx);
//HDMI commit and primary commit (PAN) happening in parallel
if(ctx->mExtDisplay->getExternalDisplay())
ctx->mExtDisplay->commit();
//Virtual barrier for threads to finish
wait4Pan(ctx);
if (ctx->mMDP.hasOverlay) {
wait4fbPost(ctx);
//Can draw to HDMI only when fb_post is reached
UIMirrorOverlay::draw(ctx);
//HDMI commit and primary commit (PAN) happening in parallel
if(ctx->mExtDisplay->getExternalDisplay())
ctx->mExtDisplay->commit();
//Virtual barrier for threads to finish
wait4Pan(ctx);
}
} else {
ctx->mOverlay->setState(ovutils::OV_CLOSED);
ctx->qbuf->unlockAll();