From 3e189158c5da0e2de873271b83ad11d8f766cc27 Mon Sep 17 00:00:00 2001 From: Neti Ravi Kumar Date: Wed, 21 Mar 2012 16:09:33 +0530 Subject: [PATCH] Unlock overlay buffers before going to suspend In video playback through overlay, it is observed that, during suspend/resume, genlock TIMEOUT errors are seen at the component level. drawLayerUsingOverlay() function locks buffers, but doesn't unlock them, before going to suspend, making the genlock_lock_buffer calls from video component to fail. Unlock any overlay buffers before going to suspend. CRs-fixed: 342878 (cherry picked from commit 4ffcd156710184fe492294fd55beea7d5f412116) Change-Id: Id0165f370d05d9b4bdf71ddaea15cf00caa65896 --- libhwcomposer/hwcomposer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index 8f6f037..d4d133f 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -1646,9 +1646,11 @@ static int hwc_set(hwc_composer_device_t *dev, ctx->nPipesUsed = 0; #endif ctx->hwcOverlayStatus = HWC_OVERLAY_PREPARE_TO_CLOSE; + unlockPreviousOverlayBuffer(ctx); } + bool canSkipComposition = list && list->flags & HWC_SKIP_COMPOSITION; #ifdef COMPOSITION_BYPASS unlockPreviousBypassBuffers(ctx);