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

Commit 9297ad6a authored by Dennis Kiilerich's avatar Dennis Kiilerich Committed by Bharath
Browse files

Turn off synthetic VSYNC when adjusting thread scheduling for performance

* This CL explicitly sets synthetic VSYNC state based on the new power state. Before, the synthetic VSYNC state was assumed based on the previous power state and in some cases was not set explicitly.
* The previous behaviour of enabling synthetic VSYNC if the only display is DOZE_SUSPEND is preserved.
* This also fixes a hypothetical gap where it would not optimise for performance if there were a display that needed it, while the primary display was DOZE_SUSPEND.

setPhysicalDisplayPowerMode now applies optimiation policy for any
internal display power mode change (external displays are out of scope
in this CL). This is necessary for foldables since the active display
has not always been updated at that point.

(This includes undoing commit 92bf32ae,
fixing the issue it caused, and adding an additional flag)

Bug: 406147398

Bug: 342681202

Bug: 404073995

Flag: android.companion.virtualdevice.flags.correct_virtual_display_power_state

Flag: com.android.graphics.surfaceflinger.flags.disable_synthetic_vsync_for_performance

Test: ran failing tests (https://android-build.corp.google.com/builds/abtd/run/L41000030010571741) and SurfaceFlinger unit tests. Also verified logs include the call to applyOptimizationPolicy and SurfaceFlinger dumpsys not showing display in synthetic VSYNC when powered on.

Change-Id: I4ffcb42379fa97546ad307f8077455495382e878
parent c6b50897
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