summaryrefslogtreecommitdiff
path: root/opengl/libagl/matrix.cpp
diff options
context:
space:
mode:
author Daniel Solomon <solomondaniel@google.com> 2019-08-19 19:31:09 -0700
committer Daniel Solomon <solomondaniel@google.com> 2019-09-05 14:41:48 -0700
commitd916d941d89ec8fdcbc2bbe0bfdf0b0db1ad08b5 (patch)
tree6003dddab62e66df29afb767bdc088d10f6d09b1 /opengl/libagl/matrix.cpp
parentc14f23093e62ca75dae66d1b0918a72fb916b285 (diff)
SurfaceFlinger: Query Scheduler when updating allowed display configs
Currently two entities in SurfaceFlinger can set a new display refresh rate: (1) SurfaceFlinger core, and (2) Scheduler. It's possible for these two entities to get out of sync in the following way: 1) Scheduler updates the refresh rate to some rate 2) Upper layers call into SurfaceFlinger to update allowed display configs 3) SurfaceFlinger always sets display rate to max If the refresh rate from #1 and #3 don't match, it can leave the system in an inconsistent state, potentially causing visual and power issues. This change fixes this problem by changing step #3: Instead of always choosing the max refresh rate, SurfaceFlinger queries the optimal refresh rate from Scheduler. If that rate isn't available, only then does SurfaceFlinger default to the maximum rate. Bug: 139557239 Test: atest libsurfaceflinger_unittest Test: Manual: 1) Start with SurfaceFlinger idling (Scheduler selected RefreshRateType::DEFAULT) 2) Trigger a change in allowed display configs from DisplayModeDirector 3) Make sure the RefreshRateType SurfaceFlinger sets is DEFAULT instead of PERFORMANCE Change-Id: Ia85a60fde55afaed5106462942e0bb77652ec737 Merged-In: Ia85a60fde55afaed5106462942e0bb77652ec737
Diffstat (limited to 'opengl/libagl/matrix.cpp')
0 files changed, 0 insertions, 0 deletions