platform_hardware_interfaces/graphics/composer/2.1/default
Steven Thomas 4492a30e14 Guard against racy ComposerClient reconnection
The hardware composer service has a rule that only one client can be
connected at a time. The surface flinger process, when transitioning
composer ownership from surface flinger to vr flinger, will destroy the
current client on one thread and create a new client on another
thread. Although surface flinger ensures that these events happen in the
expected sequence (delete then create), the requests sometimes land in
the hardware composer service in inverted order, causing the creation
request to fail with an error.

Instead of failing with an error, block for a brief period (1 second)
until the existing client is removed, then proceed to initialize the new
client. This gives us enough time to ensure an inverted
creation/destruction order doesn't cause client creation to fail, while
avoiding a deadlock if the existing client is never destroyed.

Bug: 62925812

Test: - Transitioned to/from vr flinger hundreds of times, and confirmed
I no longer see sporadic composer client creation failure due to an
already existing client.

- Ran the vts graphics composer tests and confirmed they all pass.

Change-Id: I40be1fb0cb3d42ddb5a9fc159188886e9f5b6267
2017-07-31 18:38:01 -07:00
..
Android.bp graphics: use mapper from the composer 2017-04-25 12:52:50 -07:00
android.hardware.graphics.composer@2.1-service.rc add components necessary for bootanim to animation class 2017-03-31 16:56:08 -07:00
ComposerBase.h Introduce ComposerBase interface to allow custom Hwc implementations 2017-01-26 10:32:27 -05:00
ComposerClient.cpp graphics: sideband streams are not buffers 2017-07-17 10:33:16 -07:00
ComposerClient.h graphics: sideband streams are not buffers 2017-07-17 10:33:16 -07:00
Hwc.cpp Guard against racy ComposerClient reconnection 2017-07-31 18:38:01 -07:00
Hwc.h Guard against racy ComposerClient reconnection 2017-07-31 18:38:01 -07:00
IComposerCommandBuffer.h Skip Validate 2017-06-22 04:48:33 +00:00
service.cpp graphics: set maxThreads to 4 for the composer 2017-05-12 08:40:48 -07:00