From d8091b9331b17d4a6d5d3ec04e161b7956f67cb8 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 16 May 2017 14:30:34 -0700 Subject: libui: flush hwbinder commands in Allocator::allocate Bug: 36279079 Test: monkey test on fugu Change-Id: I81f72d63d3ede64f279b26208bb5df7646050e73 --- libs/ui/Gralloc2.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/ui/Gralloc2.cpp') diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp index f8d9401a0e..87dbaf47d3 100644 --- a/libs/ui/Gralloc2.cpp +++ b/libs/ui/Gralloc2.cpp @@ -16,6 +16,7 @@ #define LOG_TAG "Gralloc2" +#include #include #include @@ -241,6 +242,9 @@ Error Allocator::allocate(BufferDescriptor descriptor, uint32_t count, *outStride = tmpStride; }); + // make sure the kernel driver sees BC_FREE_BUFFER and closes the fds now + hardware::IPCThreadState::self()->flushCommands(); + return (ret.isOk()) ? error : kTransactionError; } -- cgit v1.2.3-59-g8ed1b