Patch "drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips" has been added to the 6.12-stable tree
Subsystems (3)
[email protected]
AppliedThis is a note to let you know that I've just added the patch titled
drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips
to the 6.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-amd-display-handle-struct-drm_plane_state.ignore_damage_clips.patch
and it can be found in the queue-6.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From ac11060c6d4959e2d4ceada037d2e1e1bfcf6645 Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <[email protected]>
Date: Wed, 10 Jun 2026 17:18:17 +0200
Subject: drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips
From: Thomas Zimmermann <[email protected]>
commit ac11060c6d4959e2d4ceada037d2e1e1bfcf6645 upstream.
The mode-setting pipeline can disabled damage clippings for a commit by setting ignore_damage_clips in struct drm_plane_state. The commit will then do a full display update.
Test the flag in DCN code and do a full update in DCN code if it has been set.
Commit 35ed38d58257 ("drm: Allow drivers to indicate the damage helpers to ignore damage clips") introduced ignore_damage_clips to selectively ignore damage clipping in certain framebuffer changes. This driver does not do that, but DRM's damage iterator will soon rely on the flag. Therefore supporting it here as well make sense for consistency.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -4
@@ -5826,8 +5826,8 @@ static void fill_dc_dirty_rects(struct d {struct dm_crtc_state *dm_crtc_state =to_dm_crtc_state (crtc_state);struct rect *dirty_rects = flip_addrs->dirty_rects; -u32 num_clips; -struct drm_mode_rect *clips; +u32 num_clips =0 ; +struct drm_mode_rect *clips =NULL ;bool bb_changed;bool fb_changed;u32 i =0 ;
@@ -5843,8 +5843,10 @@ static void fill_dc_dirty_rects(struct dif (new_plane_state->rotation !=DRM_MODE_ROTATE_0 ) goto ffu; - num_clips =drm_plane_get_damage_clips_count (new_plane_state); - clips =drm_plane_get_damage_clips (new_plane_state); +if (!new_plane_state->ignore_damage_clips) { + num_clips =drm_plane_get_damage_clips_count (new_plane_state); + clips =drm_plane_get_damage_clips (new_plane_state); + }if (num_clips && (!amdgpu_damage_clips || (amdgpu_damage_clips <0 && is_psr_su)))
Patches currently in stable-queue which might be from [email protected] are
queue-6.12/drm-tests-shmem-set-dma-mask-to-64-bit-in-drm_gem_sh.patch queue-6.12/drm-amd-display-handle-struct-drm_plane_state.ignore_damage_clips.patch
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Setting `ignore_damage_clips` silently drops damage updates instead of forcing a full update…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Setting ignore_damage_clips silently drops damage updates instead of forcing a full update when MPO is requested. --
--- Patch [1]: Patch "drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips" has been added to the 6.12-stable tree --- commit f3d595b0a2d71acfd337d504cdb933e78875455e
Author: [email protected] <[email protected]>
drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips
The mode-setting pipeline can disable damage clippings for a commit by setting ignore_damage_clips in struct drm_plane_state. This commit updates the DCN code to do a full update if this flag is set.
Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0
[ ... ]
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void fill_dc_dirty_rects(struct drm_plane *plane, · line 5724
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4
-2@@ -5718,8 +5718,10 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,if (new_plane_state->rotation !=DRM_MODE_ROTATE_0 ) goto ffu; - num_clips =drm_plane_get_damage_clips_count (new_plane_state); - clips =drm_plane_get_damage_clips (new_plane_state); +if (!new_plane_state->ignore_damage_clips) { + num_clips =drm_plane_get_damage_clips_count (new_plane_state); + clips =drm_plane_get_damage_clips (new_plane_state); + }
[Severity: Medium]
When ignore_damage_clips is true, num_clips remains 0. Does this silently drop damage updates instead of forcing a full update when MPO is requested?
Further down in fill_dc_dirty_rects(), if dm_crtc_state->mpo_requested is true and both the framebuffer ID and bounding box are unchanged (e.g., frontbuffer rendering or property-only updates):
if (num_clips) {
for (; i < num_clips; clips++)
fill_dc_dirty_rect(new_plane_state->plane,
&dirty_rects[i], clips->x1,
clips->y1, clips->x2 - clips->x1,
clips->y2 - clips->y1, &i, false);
} else if (fb_changed && !bb_changed) {
fill_dc_dirty_rect(new_plane_state->plane, &dirty_rects[i],
new_plane_state->crtc_x,
new_plane_state->crtc_y,
new_plane_state->crtc_w,
new_plane_state->crtc_h, &i, false);
}
flip_addrs->dirty_rect_count = i;
return;If fb_changed and bb_changed are false, i remains 0. With num_clips also 0, flip_addrs->dirty_rect_count becomes 0. The update appears to be dropped entirely rather than falling back to a full update via the ffu path.
Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0if (num_clips && (!amdgpu_damage_clips || (amdgpu_damage_clips <0 && is_psr_su)))
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/2026072919-worshiper-candied-889c@gregkh?part=1