Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f78589c0 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Destroy DisplayDevice without holding the state lock

This is a temporary solution until we can manage transaction queues
without holding the mStateLock.

With blast, the IGBP that is passed to the VirtualDisplaySurface is
owned by the client. When the IGBP is disconnected, its buffer cache
in SF will be cleared via
SurfaceComposerClient::doUncacheBufferTransaction.

This call from the client ends up running on the main thread causing
a deadlock since setTransactionstate will try to acquire the mStateLock.
Instead we extend the lifetime of DisplayDevice and destroy it in the
main thread without holding the mStateLock. The display will be
disconnected and removed from the mDisplays list so it will not be
accessible.

Bug: 168917217
Test: adb shell settings put global use_blast_adapter_sv 1 && atest android.server.wm.MultiDisplayActivityLaunchTests
Change-Id: I8b94277cf2e807d47d6a61e4aafd8c2f183e6e7c
parent 1ed501fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment