Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7be418d6 authored by Su Hong Koo's avatar Su Hong Koo
Browse files

SF: Skip follower display presentation based on backpressure

Currently, SurfaceFlinger does not take follower display backpressure
into consideration when committing/presenting. This leads to the entire
system effectively latching on to the slowest follower refresh rate due
to backpressure in HWC if the refresh rate of the follower is lower
than the pacesetter.

This CL provides follower backpressure detection by checking for the
number of pending present fences for the display at the beginning of
Scheduler::onFrameSignal(). If there's a pending present, the scheduler
skips adding the display's frame targeter for commit/composite such
that the SF main thread and HWC does not lock up. The one exception is
when there's one pending present and the vsync is anticipated to happen
before the next pacesetter vsync, then we tolerate the temporary lockup
as it will resolve itself before the next pacesetter present. This
exception is critical in supporting refresh rates that are close to the
pacesetter's rates.

Please refer to go/pdarr-1pager for more.

Flag: com.android.graphics.surfaceflinger.flags.follower_display_backpressure
Bug: 389983019
Test: new scheduler and frame targeter unit tests && manual testing
Change-Id: Ie3cbe214410f0a15e40046fcfa0a2165814579e6
parent 223cb44c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment