drm/amd/display: fix Panel Replay artifacts on DCN 3.14 (Phoenix/Hawk Point)
cover drm/amd/display: fix Panel Replay artifacts on DCN 3.14 (Phoenix/Hawk Point)
This series fixes visual artifacts caused by Panel Replay on AMD Phoenix APUs (Radeon 780M, DCN 3.14). The artifacts appear as brief green/purple horizontal bands during screen updates — workspace switches, browser scrolling, window management. They are widely reported across vendors (Framework 16, Lenovo T14, HONOR MagicBook) and tracked as drm/amd#5087.
Root cause analysis identified two driver bugs and one firmware issue:
1. sr_skip_count is never reset after non-fast updates, allowing Panel Replay to be re-enabled on the very first fast commit following a full-frame update that disabled it. During compositor animations (e.g., GNOME workspace switch), this causes Replay to reactivate mid-animation.
2. The 500ms re-enable guard in amdgpu_dm_enable_self_refresh() uses psr_dirty_rects_change_timestamp_ns, which is only updated in the PSR-SU code path. For Panel Replay, this timestamp is never set, so the guard always passes — making it ineffective.
3. The DMCUB firmware on DCN 3.14 produces corruption during Panel Replay selective updates. This is a firmware-level issue that cannot be fixed from the driver. However, full-frame updates within Panel Replay work correctly.
Patches 1 and 2 fix the driver-side timing bugs that affect all DCN versions with Panel Replay support. Patch 3 works around the firmware issue by disabling selective update specifically on DCN 3.14, preserving Panel Replay's static-screen power savings while avoiding the buggy SU code path.
With all three patches, Phoenix/Hawk Point systems can use Panel Replay without artifacts and without the amdgpu.dcdebugmask=0x410 workaround that currently disables Replay entirely.
Tested-on: HONOR MagicBook Art 14 (FMI-XX), AMD Ryzen 7 8845HS,
Radeon 780M, Fedora 43, kernel 6.19.9
Sbenazar (3):
drm/amd/display: reset sr_skip_count on non-fast updates drm/amd/display: fix Panel Replay using stale PSR timestamp for
re-enable guard
drm/amd/display: disable Panel Replay selective update on DCN 3.14
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 ++++++++++++++- .../dc/link/protocols/link_edp_panel_control.c | 11 ++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-)
--
2.48.1
PATCH 1/3 drm/amd/display: reset sr_skip_count on non-fast updates
sr_skip_count is initialized to AMDGPU_DM_PSR_ENTRY_DELAY (5) at stream creation time but is never reset when a non-fast (MEDIUM/FULL) update occurs. After the first 5 fast commits following stream creation, the counter permanently stays at 0.
This means that after any full-frame update that disables Panel Replay (e.g., a workspace switch), the very next fast update will set allow_sr_entry = true (because !0 == true), allowing Panel Replay to be re-enabled immediately — potentially in the middle of an ongoing animation.
Fix this by resetting sr_skip_count to AMDGPU_DM_PSR_ENTRY_DELAY whenever a non-fast update occurs, ensuring that at least 5 fast commits must happen before self-refresh features are re-enabled.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -0
@@ -9854,6 +9854,12 @@ static void amdgpu_dm_enable_self_refresh(struct amdgpu_crtc *acrtc_attach,bool vrr_active =amdgpu_dm_crtc_vrr_active (acrtc_state);if (acrtc_state->update_type >UPDATE_TYPE_FAST ) { +/* +* Reset skip count after non-fast updates to prevent +* self-refresh from being re-enabled too soon during +* ongoing animations (e.g., workspace switch). +*/ + aconn->sr_skip_count =AMDGPU_DM_PSR_ENTRY_DELAY ;if (pr->config.replay_supported && !pr->replay_feature_enabled)amdgpu_dm_link_setup_replay (acrtc_state->stream->link, aconn); else if (psr->psr_version != DC_PSR_VERSION_UNSUPPORTED &&
--
2.48.1
PATCH 2/3 drm/amd/display: fix Panel Replay using stale PSR timestamp for re-enable guard
In reply to Sbenazaramdgpu_dm_enable_self_refresh() uses psr_dirty_rects_change_timestamp_ns as a 500ms guard to prevent premature re-enabling of self-refresh features after screen updates. However, this timestamp is only updated in the PSR-SU dirty rects path (when psr_version >= DC_PSR_VERSION_SU_1 and dirty_rects_changed). For Panel Replay, this timestamp is never updated, so the guard check:
(current_ts - psr->psr_dirty_rects_change_timestamp_ns) > 500000000
always evaluates to true (since the timestamp is 0 or stale), rendering the 500ms delay ineffective for Panel Replay.
Fix this by updating the timestamp when Panel Replay is disabled during non-fast updates. This ensures the 500ms guard correctly prevents re-enabling Replay during animations that generate a mix of full and fast commits (e.g., GNOME workspace switch animations).
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7 -2
@@ -10225,8 +10225,14 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,mutex_lock (&dm->dc_lock);if ((acrtc_state->update_type >UPDATE_TYPE_FAST ) || vrr_active) { -if (acrtc_state->stream->link->replay_settings.replay_allow_active) +if (acrtc_state->stream->link->replay_settings.replay_allow_active) {amdgpu_dm_replay_disable (acrtc_state->stream); +/* +* Update timestamp so the 500ms re-enable guard in +* amdgpu_dm_enable_self_refresh() works for Replay too. +*/ + acrtc_state->stream->link->psr_settings.psr_dirty_rects_change_timestamp_ns =ktime_get_ns (); + }if (acrtc_state->stream->link->psr_settings.psr_allow_active)amdgpu_dm_psr_disable (acrtc_state->stream, true); } --
2.48.1
PATCH 3/3 drm/amd/display: disable Panel Replay selective update on DCN 3.14
In reply to SbenazarOn DCN 3.14 (Phoenix/Hawk Point, Radeon 780M), the DMCUB firmware produces visual artifacts when Panel Replay operates in selective update mode. The artifacts manifest as brief green/purple horizontal bands during any screen content change — workspace switches, scrolling in browsers, window management — and do not appear in screenshots, confirming the corruption occurs at the display controller level rather than in the compositor or rendering pipeline.
The issue is widely reported across multiple vendors (Framework 16, Lenovo T14, HONOR MagicBook) and Linux distributions, tracked upstream as drm/amd#5087. The current community workaround is to disable Panel Replay entirely via amdgpu.dcdebugmask=0x410.
Rather than disabling Panel Replay altogether and losing its power savings during static screen periods, disable only the selective update component on DCN 3.14. With SU disabled, Panel Replay still allows the panel to enter low-power mode when the screen is static, but any pixel change triggers a full frame update instead of a partial one. This avoids the DMCUB firmware's buggy SU code path while preserving the primary power saving benefit of Panel Replay.
The DMCUB firmware on newer generations (DCN 3.2+) handles SU correctly and is not affected by this change.
--- .../dc/link/protocols/link_edp_panel_control.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +10 -1
@@ -1055,7 +1055,16 @@ static bool edp_setup_panel_replay(struct dc_link *link, const struct dc_stream_if (link->replay_settings.replay_feature_enabled) { pr_config_1.bits.PANEL_REPLAY_ENABLE =1 ; pr_config_1.bits.PANEL_REPLAY_CRC_ENABLE =1 ; - pr_config_1.bits.PANEL_REPLAY_SELECTIVE_UPDATE_ENABLE =1 ; +/* +* Disable selective update on DCN 3.14 (Phoenix/Hawk Point). +* The DMCUB firmware on this generation produces visual +* artifacts during selective updates. Full frame updates +* within Panel Replay still work correctly and preserve +* static-screen power savings. +*/ + pr_config_1.bits.PANEL_REPLAY_SELECTIVE_UPDATE_ENABLE = + (link->ctx->dce_version !=DCN_VERSION_3_14 ) ?1 :0 ; + pr_config_1.bits.PANEL_REPLAY_EARLY_TRANSPORT_ENABLE =1 ; pr_config_1.bits.IRQ_HPD_ASSDP_MISSING =1 ;
--
2.48.1
PATCH v3 1/4 drm/amd/display: reset sr_skip_count on non-fast updates
In reply to Sbenazarsr_skip_count is initialized to AMDGPU_DM_PSR_ENTRY_DELAY (5) at stream creation time but is never reset when a non-fast (MEDIUM/FULL) update occurs. After the first 5 fast commits following stream creation, the counter permanently stays at 0.
This means that after any full-frame update that disables Panel Replay or PSR (e.g., a workspace switch), the very next fast update will set allow_sr_entry = true (because !0 == true), allowing self-refresh to be re-enabled immediately — potentially in the middle of an ongoing animation.
Fix this by resetting sr_skip_count to AMDGPU_DM_PSR_ENTRY_DELAY whenever a non-fast update occurs, ensuring that at least 5 fast commits must happen before self-refresh features are re-enabled.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -0
@@ -9854,6 +9854,12 @@ static void amdgpu_dm_enable_self_refresh(struct amdgpu_crtc *acrtc_attach,bool vrr_active =amdgpu_dm_crtc_vrr_active (acrtc_state);if (acrtc_state->update_type >UPDATE_TYPE_FAST ) { +/* +* Reset skip count after non-fast updates to prevent +* self-refresh from being re-enabled too soon during +* ongoing animations (e.g., workspace switch). +*/ + aconn->sr_skip_count =AMDGPU_DM_PSR_ENTRY_DELAY ;if (pr->config.replay_supported && !pr->replay_feature_enabled)amdgpu_dm_link_setup_replay (acrtc_state->stream->link, aconn); else if (psr->psr_version != DC_PSR_VERSION_UNSUPPORTED &&
--
2.48.1
PATCH v3 2/4 drm/amd/display: add replay-specific timestamp for re-enable guard
In reply to Sbenazaramdgpu_dm_enable_self_refresh() uses psr_dirty_rects_change_timestamp_ns as a 500ms guard to prevent premature re-enabling of self-refresh features. However, this timestamp is only updated in the PSR-SU dirty rects path. For Panel Replay, it is never updated, so the guard always passes — the 500ms delay is ineffective.
Add a dedicated replay_disabled_timestamp_ns field to struct replay_settings. Set it when Replay is disabled in commit_planes, and check it in the inner Replay re-enable condition independently of the PSR-SU timestamp.
The outer if-condition still uses the PSR-SU timestamp, which is always stale (and therefore passes) on Replay links since PSR-SU and Replay are mutually exclusive per-link. The new inner check provides the actual 500ms guard for Replay re-enable.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++++-- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_types.h +2 -0
@@ -1208,6 +1208,8 @@ struct replay_settings {uint32_t replay_desync_error_fail_count;/* The frame skip number dal send to DMUB */ uint16_t frame_skip_number; +/* Timestamp of when replay was last disabled, for re-enable delay */ + unsigned long long replay_disabled_timestamp_ns; };#endif /* DC_TYPES_H */
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +11 -3
@@ -9887,7 +9887,8 @@ static void amdgpu_dm_enable_self_refresh(struct amdgpu_crtc *acrtc_attach, (current_ts - psr->psr_dirty_rects_change_timestamp_ns) > 500000000) { -if (pr->replay_feature_enabled && !pr->replay_allow_active) +if (pr->replay_feature_enabled && !pr->replay_allow_active && + (current_ts - pr->replay_disabled_timestamp_ns) >500000000 )amdgpu_dm_replay_enable (acrtc_state->stream, true); if (psr->psr_version == DC_PSR_VERSION_SU_1 &&
@@ -10227,8 +10229,16 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,mutex_lock (&dm->dc_lock);if ((acrtc_state->update_type >UPDATE_TYPE_FAST ) || vrr_active) { -if (acrtc_state->stream->link->replay_settings.replay_allow_active) +if (acrtc_state->stream->link->replay_settings.replay_allow_active) {amdgpu_dm_replay_disable (acrtc_state->stream); +/* +* Record when replay was disabled so the 500ms +* re-enable guard in amdgpu_dm_enable_self_refresh() +* and vblank_control_worker works correctly. +*/ + acrtc_state->stream->link->replay_settings.replay_disabled_timestamp_ns = +ktime_get_ns (); + }if (acrtc_state->stream->link->psr_settings.psr_allow_active)amdgpu_dm_psr_disable (acrtc_state->stream, true); } --
2.48.1
PATCH v3 3/4 drm/amd/display: force full frame updates for Replay on DCN 3.14
In reply to SbenazarOn DCN 3.14 (Phoenix/Hawk Point, Radeon 780M), the DMCUB firmware produces visual artifacts when Panel Replay operates in selective update mode. The artifacts manifest as brief green/purple horizontal bands during any screen content change — workspace switches, scrolling in browsers, window management — and do not appear in screenshots, confirming the corruption occurs at the display controller level rather than in the compositor or rendering pipeline.
The issue is widely reported across multiple vendors (Framework 16, Lenovo T14, HONOR MagicBook) and Linux distributions, tracked upstream as drm/amd#5087. The current community workaround is to disable Panel Replay entirely via amdgpu.dcdebugmask=0x410.
DCN 3.14 uses FreeSync Replay (DC_FREESYNC_REPLAY), not VESA Panel Replay. Unlike the VESA variant, FreeSync Replay does not have a DPCD SELECTIVE_UPDATE_ENABLE bit — selective update behavior is driven by the dirty rects that the driver sends to DMCUB via DMUB_CMD__UPDATE_DIRTY_RECT.
Fix this by forcing fill_dc_dirty_rects() to always emit a full-frame dirty rect (FFU) when Replay is active on DCN 3.14. This way DMCUB always receives a single full-screen region and never attempts a partial selective update. Panel Replay still allows the panel to sleep when the screen is static — only the update granularity changes from partial to full-frame.
The caller guarantees that dm_crtc_state->stream is non-NULL (the function is only called when psr_feature_enabled or replay_feature_enabled is set on the stream's link), so no additional NULL check is needed.
The DMCUB firmware on newer generations (DCN 3.2+) handles selective updates correctly and is not affected by this change.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +10 -0
@@ -6347,6 +6347,16 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,if (new_plane_state->rotation !=DRM_MODE_ROTATE_0 ) goto ffu; +/* +* Force full-frame updates for Replay on DCN 3.14 (Phoenix/Hawk Point). +* The DMCUB firmware on this generation produces visual artifacts when +* processing selective updates within Panel Replay. Sending a single +* full-screen dirty rect avoids the buggy SU code path in firmware. +*/ +if (dm_crtc_state->stream->link->replay_settings.replay_feature_enabled && + dm_crtc_state->stream->ctx->dce_version ==DCN_VERSION_3_14 ) + goto ffu; + num_clips =drm_plane_get_damage_clips_count (new_plane_state); clips =drm_plane_get_damage_clips (new_plane_state);
--
2.48.1
PATCH v3 4/4 drm/amd/display: add timestamp guard to vblank_control_worker for Replay
In reply to Sbenazaramdgpu_dm_crtc_set_panel_sr_feature() in the vblank_control_worker path can re-enable Panel Replay as soon as vblank is disabled and allow_sr_entry is true. Unlike amdgpu_dm_enable_self_refresh() in the commit_planes path, there is no 500ms timestamp guard here to prevent premature re-activation during ongoing animations.
This is a problem because the vblank worker runs asynchronously: a compositor may disable vblank events while a workspace animation is still producing commits, causing Replay to be re-enabled mid-animation and triggering the DMCUB firmware artifacts on affected hardware.
Fix this by adding a 500ms guard using replay_disabled_timestamp_ns (introduced in patch 2) before re-enabling Replay in the vblank worker path. This ensures both re-enable paths have consistent timing protection.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +8 -1
@@ -142,6 +142,14 @@ static void amdgpu_dm_crtc_set_panel_sr_feature(if (link->replay_settings.replay_feature_enabled && !vrr_active && allow_sr_entry && !is_sr_active && !is_crc_window_active) { +/* +* Enforce 500ms delay after replay was last disabled to prevent +* re-enabling during ongoing animations (e.g., workspace switch). +* Mirrors the guard in amdgpu_dm_enable_self_refresh(). +*/ +if ((ktime_get_ns () - link->replay_settings.replay_disabled_timestamp_ns) + <=500000000 ) +return ;amdgpu_dm_replay_enable (vblank_work->stream, true); }else if (vblank_enabled) {if (link->psr_settings.psr_version <DC_PSR_VERSION_SU_1 && is_sr_active) --
2.48.1
v3 cover drm/amd/display: fix Panel Replay artifacts on DCN 3.14 (Phoenix/Hawk Point)
In reply to SbenazarChanges since v1:
- Patch 1: expanded commit message to mention PSR impact too (code unchanged).
- Patch 2: rewritten. Instead of piggybacking on psr_dirty_rects_change _timestamp_ns, add a dedicated replay_disabled_timestamp_ns field to struct replay_settings. The re-enable guard in amdgpu_dm_enable_self_refresh() now checks the replay timestamp separately from the PSR timestamp, so neither feature can interfere with the other's timing.
- Patch 3: drop redundant NULL check on stream — the caller already guarantees it is non-NULL (code simplified).
- Patch 4: new. Add the same 500ms timestamp guard to the vblank_control_worker path (amdgpu_dm_crtc_set_panel_sr_feature), which was unprotected and could re-enable Replay too soon when vblank events were toggled during animations.
This series fixes visual artifacts caused by Panel Replay on AMD Phoenix APUs (Radeon 780M, DCN 3.14). The artifacts appear as brief green/purple horizontal bands during screen updates — workspace switches, browser scrolling, window management. They are widely reported across vendors (Framework 16, Lenovo T14, HONOR MagicBook) and tracked as drm/amd#5087.
Root cause analysis identified two driver bugs, one missing guard, and one firmware issue:
1. sr_skip_count is never reset after non-fast updates, allowing Panel Replay (and PSR) to be re-enabled on the very first fast commit following a full-frame update that disabled it. During compositor animations (e.g., GNOME workspace switch), this causes Replay to reactivate mid-animation.
2. The 500ms re-enable guard in amdgpu_dm_enable_self_refresh() uses psr_dirty_rects_change_timestamp_ns, which is only updated in the PSR-SU code path. For Panel Replay, this timestamp is never set, so the guard always passes — making it ineffective.
3. The vblank_control_worker path (amdgpu_dm_crtc_set_panel_sr_feature) can re-enable Panel Replay without any timestamp guard at all.
4. The DMCUB firmware on DCN 3.14 produces corruption during selective updates within FreeSync Replay.
Patches 1–2 fix the timing bugs, patch 4 closes the vblank worker re-enable hole, and patch 3 works around the firmware issue by forcing full-frame dirty rects on DCN 3.14.
With all four patches, Phoenix/Hawk Point systems can use Panel Replay without artifacts and without the amdgpu.dcdebugmask=0x410 workaround that currently disables Replay entirely.
Tested-on: HONOR MagicBook Art 14 (FMI-XX), AMD Ryzen 7 8845HS,
Radeon 780M, Fedora 43, kernel 6.19.9
Sbenazar (4):
drm/amd/display: reset sr_skip_count on non-fast updates drm/amd/display: add replay-specific timestamp for re-enable guard drm/amd/display: force full frame updates for Replay on DCN 3.14 drm/amd/display: add timestamp guard to vblank_control_worker for
Replay
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +++++++++++++++++++-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 8 ++++++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ 3 files changed, 40 insertions(+), 2 deletions(-)
--
2.48.1