From 98d413ef1303643d7e1f3fbc12fd917378c28559 Mon Sep 17 00:00:00 2001 From: "Arun Kumar K.R" Date: Tue, 3 Apr 2012 15:38:23 -0700 Subject: [PATCH] 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 --- libhwcomposer/hwcomposer.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index d4d133f..2a48a1c 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -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