Do not startPeriodTransition for OFF displays
Inspired by discussion in Ida666af9a3a9b2e940c1f861ce3b765f67738f1f. resyncAllToHardwareVsync calls resyncToHardwareVsyncLocked for *all* physical displays, even if they are turned off. This can be seen in dumpsys - for example, on a two-display device on which only one display has turned on since boot, mPeriodConfirmationInProgress may be set to 1 (true) for the display that is off. Correct this by checking Scheduler's record of the display's PowerMode. Skip resyncToHardwareVsyncLocked if the display is OFF. (This matches Scheduler::onHardwareVsyncRequest's decision of whether to call the mSchedulerCallback's requestHardwareVsync.) This prevents attempting to start a period transition, as well as making hardware VSYNCs allowed. Bug: 255601557 Test: adb shell dumpsys SurfaceFlinger --vsync Test: atest libsurfaceflinger_unittest:SchedulerTest Change-Id: I88e7451622c259056d26748c64fcaa0bdcb836b8
Loading
Please register or sign in to comment