Skip to content

Commit

Permalink
SF: set debug.sf.frame_rate_multiple_threshold to 60 by default
Browse files Browse the repository at this point in the history
If the device only have 60 and 120 Hz in the config group, 60 Hz won't be
used when watching a 24 fps video and instead 120 Hz will be used because
it is perfectly divisible by 24.

This is a publicly documented AOSP behavior [1], but it simply does not
make any practical sense and trades off significant amount of power for a
very-hard-to-notice jitter-free experience.

Set debug.sf.frame_rate_multiple_threshold to 60 by default to limit this
behavior to 60 or lower fps.

[1] https://source.android.com/devices/graphics/multiple-refresh-rate

Change-Id: I66353abc46ad16e63b2c9188794469ad71f2192e
Signed-off-by: Juhyung Park <[email protected]>
  • Loading branch information
arter97 authored and S-H-A-M-I-K committed Aug 1, 2023
1 parent fff7b95 commit 4407ad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/surfaceflinger/SurfaceFlinger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2857,7 +2857,7 @@ sp<DisplayDevice> SurfaceFlinger::setupNewDisplayDeviceInternal(
scheduler::RefreshRateConfigs::Config config =
{.enableFrameRateOverride = android::sysprop::enable_frame_rate_override(false),
.frameRateMultipleThreshold =
base::GetIntProperty("debug.sf.frame_rate_multiple_threshold", 0),
base::GetIntProperty("debug.sf.frame_rate_multiple_threshold", 60),
.idleTimerTimeout = idleTimerTimeoutMs,
.kernelIdleTimerController = kernelIdleTimerController};
creationArgs.refreshRateConfigs =
Expand Down

0 comments on commit 4407ad7

Please sign in to comment.