From dc22c8ffb528c5a1b5499c29dae5c93cbeadae7c Mon Sep 17 00:00:00 2001 From: Jeykumar Sankaran Date: Wed, 29 Feb 2012 16:48:39 -0800 Subject: [PATCH] hwcomposer: Force close bypass MDP pipes on suspend. Since SF wont compose when device is on suspend mode, MDP_UNSET can be called to close all allocated bypass pipes. Change-Id: Ia4610c34e6d89028f8b3400af023296c459dd8d1 (cherry picked from commit 32a9e25b699d7abde661f3ad947ed58a09a1b132) --- libhwcomposer/hwcomposer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index aacf997..4d81b62 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -1522,6 +1522,12 @@ static int hwc_set(hwc_composer_device_t *dev, drawLayerUsingCopybit(dev, &(list->hwLayers[i]), (EGLDisplay)dpy, (EGLSurface)sur); } } + } else { + //Device in suspended state. Close all the MDP pipes +#ifdef COMPOSITION_BYPASS + ctx->nPipesUsed = 0; +#endif + ctx->hwcOverlayStatus = HWC_OVERLAY_PREPARE_TO_CLOSE; }