Android 15 introduces the adaptive refresh rate (ARR) feature, which lets the display refresh rate adapt to the content frame rate using discrete VSync steps.
The ARR feature offers the following benefits:
- Reducing power consumption: By default, ARR lets devices operate at rates lower than their maximum refresh rates, transitioning to higher rates only when essential for the user experience, which minimizes unnecessary power consumption.
- Reducing jank: ARR eliminates the need for mode switching, which is a known cause for jank.
Overview
On non-ARR panels, the display refreshes at a fixed cadence determined by the active display mode.
On ARR panels, the display VSync rate and refresh rate are decoupled, which lets refresh rates change within one display mode based on content update cadence. Panels can run at refresh rates that are divisors of the panel's tearing effect (TE). OEMs can implement ARR based on their preferred power trade-offs.
The following figure shows a display with vsyncPeriod
of 240 Hz and
minFrameIntervalNs
(maximum refresh rate) of 120 Hz. VSync occurs every
4.16 ms. A frame can be presented at any multiple of VSync after the
minFrameIntervalNs
from the last frame.
Figure 1. Example of ARR.
Implementation
Android 15 supports ARR with new Hardware Composer (HWC) HAL APIs and platform
changes. To enable ARR, OEMs must support kernel and system changes on devices
running Android 15 and higher, and implement version 3 of the
android.hardware.graphics.composer3
APIs, as listed in the following
sections.
See Pixel's reference implementation of the APIs that support ARR for more information.
DisplayConfiguration.aidl
The DisplayConfiguration.aidl
API specifies the display configuration
using display attributes, along with the following attributes for ARR:
- Optional
vrrConfig
: If set, ARR is enabled for specific configurations. If set tonull
, the display mode is set to non-ARR modes such as multiple refresh rate (MRR). With this attribute, a display can be configured as either MRR or ARR, but not both. vsyncPeriod
: The VSync rate of the display. On ARR displays, this value is used to derive the supported discrete refresh rates.Vendors must set the
DisplayConfiguration.vsyncPeriod
value for all devices. For non-ARR displays,DisplayConfiguration.vsyncPeriod
is the display refresh rate. If a device supports 120 Hz, then this value must be 8.3 ms.For ARR displays,
DisplayConfiguration.vsyncPeriod
is the TE signal frequency. If a device has aminFrameIntervalNs
of 8.3 ms but the TE is 240 Hz, this value must be 4.16 ms.
VrrConfig.aidl
The VrrConfig.aidl
API includes the following attributes:
minFrameIntervalNs
: The max refresh rate the display can support.NotifyExpectedPresentConfig
: This is determined by when the display requires advance notice of an upcoming frame.
IComposerClient.notifyExpectedPresent
provides a hint for a frame that is likely to be presented, so that the display
can adapt its self-refresh period accordingly. frameIntervalNs
represents the
present cadence that follows after the expectedPresentTime
. For example, if
notifyExpectedPresent
is called with expectedPresentTime
N and
frameIntervalNs
of 16.6 ms, then the next frame is at N + 16.6 ms
after the present time N. After the present time N, the frame cadence is
16.6 ms until there are further changes.
IComposerClient.notifyExpectedPresent
is called only when
DisplayConfiguration.notifyExpectedPresentConfig
is set, and if one of the
following timing conditions occurs:
- Out-of-cadence present time: The expected presentation time of the next
frame deviates from the display's regular refresh rate defined by
frameIntervalNs
. - Timeout exceeded: The time interval between the previous frames is greater
than or equal to
notifyExpectedPresentConfig.timeoutNs
.
DisplayCommand.frameIntervalNs
DisplayCommand.frameIntervalNs
provides a hint about the cadence for the upcoming frames in nanoseconds.
Testing
Use
onRefreshRateChangedDebug
for debugging. This method notifies the client that the refresh rate of the
display has changed.
Use the
TouchLatency
test app for manual testing as shown in Figure 2:
Figure 2. TouchLatency test app.
In the test app, use the slider to adjust the render rate to various values of divisor refresh rates of the display's refresh rate. Observe how the frame rate changes based on the requested rate.