From: Matthew Schwartz <matthew.schwartz@linux.dev>
To: amd-gfx@lists.freedesktop.org
Cc: Harry Wentland <harry.wentland@amd.com>,
Leo Li <sunpeng.li@amd.com>,
Rodrigo Siqueira <siqueira@igalia.com>,
Alex Deucher <alexander.deucher@amd.com>,
Ivan Lipski <ivan.lipski@amd.com>,
Fangzhi Zuo <jerry.zuo@amd.com>,
Aurabindo Pillai <aurabindo.pillai@amd.com>,
Pei-Hsin Yang <peihsiny@valvesoftware.com>,
Matthew Schwartz <matthew.schwartz@linux.dev>
Subject: [PATCH 0/2] drm/amd/display: Rebuild the VRR vtotal limits on a modeset
Date: Wed, 25 Nov 2026 21:36:04 -0800 [thread overview]
Message-ID: <20261126053606.12286-1-matthew.schwartz@linux.dev> (raw)
A modeset between two modes with the same refresh rate keeps the
previous mode's v_total_min/max when VRR stays enabled across it, since
mod_freesync_build_vrr_params() only rebuilds them when the VRR state or
refresh range changes. Commit 33c995709121 handled this for the inactive
state. With VRR active and no BTR, the old limits stay in use for as
long as the client keeps flipping at the refresh rate.
This came up with gamescope, which keeps VRR_ENABLED set across mode
changes and, with its adaptive_sync_idle_hold option, presents on every
vblank while the Steam UI is focused. Switching from 1080p60 to 4K60 in
Steam's display settings then gave no picture on a number of HDMI
displays, a Dell S2721QS (40-60 Hz) and an LG CX among them. In the
Dell's log the atomic commit intervals after the switch were 8.3 ms,
12.5 ms and 20.8 ms. Those are 1125, 1687 and 1125 + 1687 lines of the
4K timing, the 1080p limits for 60 and 40 Hz. Without the hold the idle
UI flips slowly enough to reach the fixed refresh path, which rebuilds
the limits, so the problem stayed hidden.
Tested on an ASUS ROG Xbox Ally X20 (internal panel, 30-120 Hz) with a
7.3.1-based kernel and a small KMS test. It sets two 50 Hz modes with
vtotals of 2764 and 2592, turns VRR on in the first and flips at full
rate across a modeset to the second. Without patch 1 the second mode
flips every 21.33 ms, which is the first mode's v_total_min, until VRR
is toggled. With it the interval is 20.1 ms.
Patch 1 clears the saved VRR params on a modeset so they are rebuilt
from the new stream. Patch 2 adds KUnit cases for it.
Matthew Schwartz (2):
drm/amd/display: Rebuild the VRR vtotal limits on a modeset
drm/amd/display: Test VRR vtotal limits across a modeset
.../display/amdgpu_dm/amdgpu_dm_freesync.c | 10 ++++
.../amdgpu_dm/tests/amdgpu_dm_freesync_test.c | 52 +++++++++++++++++++
2 files changed, 62 insertions(+)
base-commit: da37959f4a22c6bb25a337fcc7946101c8a10f7b
--
2.54.0 (Apple Git-157)
next reply other threads:[~2026-11-26 8:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 5:36 Matthew Schwartz [this message]
2026-11-26 5:36 ` [PATCH 1/2] drm/amd/display: Rebuild the VRR vtotal limits on a modeset Matthew Schwartz
2026-11-26 8:26 ` sashiko-bot
2026-11-26 5:36 ` [PATCH 2/2] drm/amd/display: Test VRR vtotal limits across " Matthew Schwartz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126053606.12286-1-matthew.schwartz@linux.dev \
--to=matthew.schwartz@linux.dev \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=harry.wentland@amd.com \
--cc=ivan.lipski@amd.com \
--cc=jerry.zuo@amd.com \
--cc=peihsiny@valvesoftware.com \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox