SF: Restore mStateLock mutex for modesetting
In order to fix a deadlock during display hotplug, the modesetting mutex was changed from mStateLock to a granular DisplayModeController lock, in the following CLs: I30ec756f134d2d67a70ac8797008dc792eac035e Iaae02d95e175e55f52f65da1481b64f1f533a04c (reverted) This exposed a data race leading to a crash, which, unlike the deadlock, affects all devices with refresh rate switching. The race will be fixed by: If6141d2928643e82b3251b321e18c300cd8c201c (WIP) As a stopgap until then, restore mStateLock (on top of the DMC lock) on the main thread to fix the race, but reintroduce the deadlock. The lock was already restored on the idle timer thread by the reverted CL above. Fixes: 348827779 Flag: com.android.graphics.surfaceflinger.flags.connected_display Test: Manual (foldable, connected display) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b2fc4235635f5160ed5ae35c1fbd1fcc3e45c59f) Merged-In: Ie15de10d16eefeb65289574b120d2ef4cc09d6c0 Change-Id: Ie15de10d16eefeb65289574b120d2ef4cc09d6c0
Loading
Please register or sign in to comment