hwcomposer: fix blank screen on external display.

fixes the black screen when external display is connected
during bypass and when video is paused.

(cherry picked from commit 2ffc188a6cad26a347e565211564640173f340ac)

Change-Id: I6caeda8bbc744a45164e2ae139345ba4aab55dab
CRs-fixed: 346284
This commit is contained in:
Arun Kumar K.R 2012-04-03 15:38:23 -07:00 committed by andrew.boren
parent 3e189158c5
commit 98d413ef13

View File

@ -900,7 +900,8 @@ static void handleHDMIStateChange(hwc_composer_device_t *dev, int externaltype)
if (fbDev) {
fbDev->enableHDMIOutput(fbDev, externaltype);
}
// Yield - Allows the UI channel(with zorder 0) to be opened first
sched_yield();
if(ctx && ctx->mOverlayLibObject) {
overlay::Overlay *ovLibObject = ctx->mOverlayLibObject;
if (!externaltype) {
@ -1680,6 +1681,16 @@ static int hwc_set(hwc_composer_device_t *dev,
if(ctx->pendingHDMI) {
handleHDMIStateChange(dev, ctx->mHDMIEnabled);
ctx->pendingHDMI = false;
hwc_procs* proc = (hwc_procs*)ctx->device.reserved_proc[0];
if(!proc) {
LOGE("%s: HWC proc not registered", __FUNCTION__);
} else {
/* Trigger SF to redraw the current frame
* Used when the video is paused and external
* display is connected
*/
proc->invalidate(proc);
}
}
#endif