* Patch "drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips" has been added to the 6.18-stable tree
@ 2026-07-29 11:19 gregkh
2026-07-29 11:29 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2026-07-29 11:19 UTC (permalink / raw)
To: alexander.deucher, dri-devel, gregkh, harry.wentland, javierm,
tzimmermann, zackr
Cc: stable-commits
This 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.18-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.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From ac11060c6d4959e2d4ceada037d2e1e1bfcf6645 Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <tzimmermann@suse.de>
Date: Wed, 10 Jun 2026 17:18:17 +0200
Subject: drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips
From: Thomas Zimmermann <tzimmermann@suse.de>
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.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 35ed38d58257 ("drm: Allow drivers to indicate the damage helpers to ignore damage clips")
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Zack Rusin <zackr@vmware.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a24019f6480fad5c077b5956eed942c8960323d6)
Cc: <stable@vger.kernel.org> # v6.8+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6240,8 +6240,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;
@@ -6257,8 +6257,10 @@ static void fill_dc_dirty_rects(struct d
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);
+ }
if (num_clips && (!amdgpu_damage_clips || (amdgpu_damage_clips < 0 &&
is_psr_su)))
Patches currently in stable-queue which might be from tzimmermann@suse.de are
queue-6.18/drm-tests-shmem-set-dma-mask-to-64-bit-in-drm_gem_sh.patch
queue-6.18/drm-sysfb-avoid-possible-truncation-with-calculating-visible-size.patch
queue-6.18/drm-sysfb-do-not-page-align-visible-size-of-the-framebuffer.patch
queue-6.18/drm-sysfb-return-errno-code-from-drm_sysfb_get_visible_size.patch
queue-6.18/drm-sysfb-avoid-truncating-maximum-stride.patch
queue-6.18/drm-amd-display-handle-struct-drm_plane_state.ignore_damage_clips.patch
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Patch "drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips" has been added to the 6.18-stable tree
2026-07-29 11:19 Patch "drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips" has been added to the 6.18-stable tree gregkh
@ 2026-07-29 11:29 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-07-29 11:29 UTC (permalink / raw)
To: gregkh; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] In the MPO (Multi-Plane Overlay) path, setting `ignore_damage_clips` fails to trigger a full update if the framebuffer and bounding box haven't changed, resulting in a dropped display update.
--
--- Patch [1]: Patch "drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips" has been added to the 6.18-stable tree ---
commit e9e0d8ca6e7cebee70fe44f3b50f1d51b508e3bf
Author: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
Subject: drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips
This commit updates the DCN driver code to support the ignore_damage_clips
flag from drm_plane_state. By bypassing damage clip retrieval when this flag
is set, the driver is intended to perform a full display update instead of a
partial one.
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 7fe40bbba2658..97e14e02bf8c0 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
[ ... ]
> @@ -6229,8 +6229,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: High]
When ignore_damage_clips is true, num_clips remains 0. Does this cause an
issue for the MPO (Multi-Plane Overlay) path further down in this function?
Looking at the MPO path later in fill_dc_dirty_rects():
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:fill_dc_dirty_rects() {
...
fb_changed = old_plane_state->fb->base.id !=
new_plane_state->fb->base.id;
bb_changed = (old_plane_state->crtc_x != new_plane_state->crtc_x ||
old_plane_state->crtc_y != new_plane_state->crtc_y ||
...);
...
if (num_clips) {
for (; i < num_clips; clips++)
...
} else if (fb_changed && !bb_changed) {
fill_dc_dirty_rect(new_plane_state->plane, &dirty_rects[i],
...
}
flip_addrs->dirty_rect_count = i;
return;
}
If dm_crtc_state->mpo_requested is true, and both fb_changed and bb_changed
are false, the code bypasses the goto ffu (Full Frame Update) logic used by
the non-MPO path.
Since num_clips is 0, the MPO logic will not add any dirty rects, resulting in
flip_addrs->dirty_rect_count being 0.
Instead of forcing a full display update when ignore_damage_clips is set,
could this silently drop the display update entirely?
> if (num_clips && (!amdgpu_damage_clips || (amdgpu_damage_clips < 0 &&
> is_psr_su)))
> goto ffu;
--
Sashiko AI review · https://sashiko.dev/#/patchset/2026072928-caring-papaya-ed97@gregkh?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-29 11:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 11:19 Patch "drm/amd/display: Handle struct drm_plane_state.ignore_damage_clips" has been added to the 6.18-stable tree gregkh
2026-07-29 11:29 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.