[SRU][R][PATCH 0/2] drm/amd/display: fix flip-event corruption on mixed-refresh DP setups (LP: #2169237)
Thomas Moore
moore.thomas123456789 at gmail.com
Sat Oct 10 01:33:33 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2169237
[Impact]
7.0.0-38 includes "drm/amd/display: consolidate DCN vblank/flip handling
onto vupdate_no_lock" (8382cd234981) but not its upstream follow-ups.
VUPDATE_NO_LOCK fires every frame regardless of whether a flip has
latched, so a flip event can reach userspace before the hardware has
latched the new buffer. Userspace then draws into a buffer that is still
being scanned out, causing flickering lines and blocks.
Reported on an RX 7900 XTX with DP monitors at 165 Hz and 75 Hz,
triggered by redrawing terminal UIs and moving windows. 7.0.0-34 is good,
7.0.0-38 is bad. LP: #2169237 is Confirmed with other affected users.
[Fix]
Two upstream stable backports from linux-7.1.y:
48ab86360af1 drm/amd/display: check GRPH_FLIP status before sending event
8419331e64d9 drm/amd/display: Exit idle optimizations before programming
(Fixes: 48ab86360af1)
The second corrects an ordering problem in the first, where the
flip-pending check could read hardware state while PSR/IPS idle
optimisations were still active.
https://gitlab.freedesktop.org/drm/amd/-/work_items/4141
https://gitlab.freedesktop.org/drm/amd/-/work_items/5527
The Fixes: commit in patch 1 (9b47278cec98) is present in 7.0.0-38.
Patch 1 needed one manual adjustment: dc_get_flip_pending_on_otg() is
placed after dc_interrupt_ack() in dc/core/dc.c because the surrounding
context differs between 7.0 and 7.1.y. The rest applied unchanged.
[Test Case]
ASRock B850I Lightning WiFi, RX 7900 XTX, DP-1 at 165 Hz and DP-2 at 75 Hz,
KDE Plasma on Wayland. Run Codex CLI (or btop) in a focused window and
drag windows across both monitors.
Before: flickering lines and blocks on both monitors.
After: about 100 minutes with no artifacts, covering the same triggers, a
game session, and both refresh rates. Image and modules are a matched pair
built from Ubuntu-7.0.0-38.38 plus these two commits.
Stock 7.0.0-38 was not re-tested on the same day.
[Where problems could occur]
These change flip-event delivery and vblank/idle-exit ordering in
amdgpu_dm for all DCN ASICs. A mistake could delay or drop flip events,
causing stalled frames, or break PSR/IPS exit and affect power saving.
Both commits are in upstream stable trees (7.1.y, 6.18.y) and the second
fixes a known problem in the first, so the two should be applied together.
Leo Li (2):
drm/amd/display: check GRPH_FLIP status before sending event
drm/amd/display: Exit idle optimizations before programming
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 243 +++++++++++++-----
drivers/gpu/drm/amd/display/dc/core/dc.c | 45 ++++
drivers/gpu/drm/amd/display/dc/dc.h | 1 +
3 files changed, 230 insertions(+), 59 deletions(-)
--
2.53.0
More information about the kernel-team
mailing list