From: sashiko-bot@kernel.org
To: "Thomas Zimmermann" <tzimmermann@suse.de>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v4 01/10] drm/damage-helper: Do not alter damage clips on modeset, but ignore them
Date: Sat, 30 May 2026 19:10:59 +0000 [thread overview]
Message-ID: <20260530191059.7EAB21F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260530185716.65688-2-tzimmermann@suse.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Drivers using raw damage clip getters bypass the newly introduced `ignore_damage_clips` flag, leading to partial screen updates during full modesets.
--
commit 8480930644dc907381d0145f944fe144e2010b34
Author: Thomas Zimmermann <tzimmermann@suse.de>
drm/damage-helper: Do not alter damage clips on modeset, but ignore them
This commit changes the behavior of drm_atomic_helper_check_plane_damage()
to preserve fb_damage_clips during a modeset. Instead of clearing the clips,
it now sets a new ignore_damage_clips flag, which the damage iterator
respects.
> diff --git a/drivers/gpu/drm/drm_damage_helper.c b/drivers/gpu/drm/drm_damage_helper.c
> index 74a7f4252ecff..945fac8dc27b6 100644
> --- a/drivers/gpu/drm/drm_damage_helper.c
> +++ b/drivers/gpu/drm/drm_damage_helper.c
[ ... ]
> @@ -78,10 +78,8 @@ void drm_atomic_helper_check_plane_damage(struct drm_atomic_commit *state,
> if (WARN_ON(!crtc_state))
> return;
>
> - if (drm_atomic_crtc_needs_modeset(crtc_state)) {
> - drm_property_blob_put(plane_state->fb_damage_clips);
> - plane_state->fb_damage_clips = NULL;
> - }
> + if (drm_atomic_crtc_needs_modeset(crtc_state))
> + plane_state->ignore_damage_clips = true;
> }
> }
[Severity: High]
Does this change cause a regression for drivers that use the raw damage clip
getters instead of the iterator?
Several drivers call drm_plane_get_damage_clips() and
drm_plane_get_damage_clips_count() directly. These raw getters return the
fb_damage_clips without evaluating the new ignore_damage_clips flag:
drivers/gpu/drm/drm_plane.c:drm_plane_get_damage_clips() {
...
return __drm_plane_get_damage_clips(state);
}
Before this patch, fb_damage_clips was forced to NULL on modeset, which
caused drivers to correctly fall back to a full frame update. Now they will
see num_clips > 0 and attempt a partial screen update during a full modeset.
For example, in amdgpu, the full frame update fallback is skipped:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:fill_dc_dirty_rects() {
...
num_clips = drm_plane_get_damage_clips_count(new_plane_state);
clips = drm_plane_get_damage_clips(new_plane_state);
...
}
Similarly in vboxvideo:
drivers/gpu/drm/vboxvideo/vbox_mode.c:vbox_primary_atomic_update() {
...
clips = drm_plane_get_damage_clips(new_state);
num_clips = drm_plane_get_damage_clips_count(new_state);
...
}
And in vmwgfx:
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c:vmw_ldu_primary_plane_atomic_update() {
...
struct drm_mode_rect *damage_rects = drm_plane_get_damage_clips(new_state);
u32 rect_count = drm_plane_get_damage_clips_count(new_state);
...
}
Should the raw getters be updated to check ignore_damage_clips, or should
these drivers be transitioned to use the damage iterator?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260530185716.65688-1-tzimmermann@suse.de?part=1
next prev parent reply other threads:[~2026-05-30 19:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 18:53 [PATCH v4 00/10] drm: Improve logic behind damage handling Thomas Zimmermann
2026-05-30 18:53 ` [PATCH v4 01/10] drm/damage-helper: Do not alter damage clips on modeset, but ignore them Thomas Zimmermann
2026-05-30 19:10 ` sashiko-bot [this message]
2026-06-01 10:16 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 02/10] drm/atomic-helpers: Evaluate plane damage after atomic_check Thomas Zimmermann
2026-05-30 19:08 ` sashiko-bot
2026-06-01 10:19 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 03/10] drm/ingenic: Remove calls to drm_atomic_helper_check_plane_damage() Thomas Zimmermann
2026-05-30 19:05 ` sashiko-bot
2026-06-01 10:20 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 04/10] drm/appletbdrm: Allocate request/response buffers in begin_fb_access Thomas Zimmermann
2026-05-30 19:09 ` sashiko-bot
2026-06-01 10:21 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 05/10] drm/atomic_helper: Do not evaluate plane damage before atomic_check Thomas Zimmermann
2026-06-01 10:22 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 06/10] drm/damage-helper: Test src coord in drm_atomic_helper_check_plane_damage() Thomas Zimmermann
2026-05-30 19:09 ` sashiko-bot
2026-06-01 10:27 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 07/10] drm/damage-helper: Remove old state from drm_atomic_helper_damage_iter_init() Thomas Zimmermann
2026-06-01 10:28 ` Javier Martinez Canillas
2026-06-01 14:01 ` Hamza Mahfooz
2026-05-30 18:53 ` [PATCH v4 08/10] drm/damage-helper: Remove old state from drm_atomic_helper_damage_merged() Thomas Zimmermann
2026-05-30 19:16 ` sashiko-bot
2026-06-01 10:29 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 09/10] drm/damage-helper: Rename state parameters in damage helpers Thomas Zimmermann
2026-06-01 10:29 ` Javier Martinez Canillas
2026-05-30 18:53 ` [PATCH v4 10/10] drm/vmwgfx: Remove unused field struct vmwgfx_du_update_plane.old_state Thomas Zimmermann
2026-06-01 10:30 ` Javier Martinez Canillas
2026-05-30 19:19 ` ✗ Fi.CI.BUILD: failure for drm: Improve logic behind damage handling (rev3) Patchwork
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=20260530191059.7EAB21F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tzimmermann@suse.de \
/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 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.