Create VR HWComposer without locks held
Problem: Surfaceflinger is occassionally deadlocking when switching to VR Mode. Root-cause: During the creation of the VR HWComposer through hwbinder, hwservicemanager notifies surfaceflinger the service is available through a binder callback. Because Surfaceflinger holds the state-lock during the HWComposer creation, its possible all of SurfaceFlinger's binder threads are handling other transactions waiting for the state-lock to be released. This prevents the hwservicemanager callback ever to be handled resulting in a deadlock. Solution: Don't hold the state-lock when instantiating the VR HWComposer. Test: Validated deadlocks no longer occur when switching to VR mode. Bug: 35680107 Change-Id: I932c81fce293a8b57983f4242432b87522ce964c
Loading
Please register or sign in to comment