Rev up vr_hwc to composer@2.3
Fix for issue: "[GSI XR] VrFlinger doesn't work on GSI/MTP845." The flow that causes the issue is: SurfaceFlinger gets an hotplug event and adds a display id of the internal display (For instance, display id of 19260371107735809). This display id gets added to the HWComposer through the hotplug event. When updateVrFlinger() is eventually called in SurfaceFlinger, a new HWComposer is created which has no display ids being tracked in HWComposer. Another hotplug event starts from vr_hwc.cpp, which has a display id of 0. SurfaceFlinger receives this hot plug event so SurfaceFlinger has an display ids of [19260371107735809, 0]. HWComposer only has display id 0. Next processDisplayChangesLocked() is called in SurfaceFlinger and a new FramebufferSurface is created with display id 19260371107735809. In the FramebufferSurface it tries to call getActiveConfig() in HWComposer with the display id of 19260371107735809, which HWComposer does not know about. This results in a crash. The display id is created from the edid data and display port. The fix is to have the vr_hwc return the same edid data and display port as the internal display. This will make the display id originating from vr_hwc be the same as the internal display id. SurfaceFlinger will now only have the display id of 19260371107735809, since it does not overwrite the same display id on the hotplug events. HWComposer will only have display id of 19260371107735809. The SurfaceFlinger and HwComposer display ids match the code works correctly now. This is accomplished by creating a version 2.0 of the vr_composer_client and having vr_hwc inherit from version 2.3 instead of version 2.1 of the composer hal. These changes are required to be able to pass through the edid data. The display port and edid data is retrieved by vr_hwc via the display_client. The other required changes needed for this to work is: ag/9215156 ag/9226524 Bug: 137325030 Bug: 138938154 Bug: 137448042 Test: manual - ran through modified unit test to make sure the edid data was returned on the MTP 845. Change-Id: I1c54e6cfda348260cf1013d6dca0dda58acb3b3c
Loading
Please register or sign in to comment