From: sashiko-bot@kernel.org
To: "Thomas Zimmermann" <tzimmermann@suse.de>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v4 08/10] drm/damage-helper: Remove old state from drm_atomic_helper_damage_merged()
Date: Sat, 30 May 2026 19:16:01 +0000 [thread overview]
Message-ID: <20260530191602.550E61F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260530185716.65688-9-tzimmermann@suse.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The i915 driver fails to perform full plane updates when source coordinates change (e.g., panning or cropping), leading to visual corruption.
--
commit 020ae3c303979cf114157a7b95370725231ed90b
Author: Thomas Zimmermann <tzimmermann@suse.de>
drm/damage-helper: Remove old state from drm_atomic_helper_damage_merged()
Nothing in drm_atomic_helper_damage_merged() requires the old plane state.
Remove the parameter and mass-convert callers. Most callers now no longer
require the old plane state in their plane's atomic_update helper.
> diff --git a/drivers/gpu/drm/i915/display/intel_plane.c b/drivers/gpu/drm/i915/display/intel_plane.c
> index 2a52b36c646c7..3560e222a3eae 100644
> --- a/drivers/gpu/drm/i915/display/intel_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_plane.c
[ ... ]
> @@ -346,7 +346,6 @@ static void intel_plane_clear_hw_state(struct intel_plane_state *plane_state)
>
> static void
> intel_plane_copy_uapi_plane_damage(struct intel_plane_state *new_plane_state,
> - const struct intel_plane_state *old_uapi_plane_state,
> const struct intel_plane_state *new_uapi_plane_state)
> {
> struct intel_display *display = to_intel_display(new_plane_state);
> @@ -356,10 +355,9 @@ intel_plane_copy_uapi_plane_damage(struct intel_plane_state *new_plane_state,
> if (DISPLAY_VER(display) < 12)
> return;
>
> - if (!drm_atomic_helper_damage_merged(&old_uapi_plane_state->uapi,
> - &new_uapi_plane_state->uapi,
> + if (!drm_atomic_helper_damage_merged(&new_uapi_plane_state->uapi,
> damage))
[Severity: High]
Does this code risk missing full plane updates when source coordinates change?
It appears that with the removal of the old state, the fallback checking
for source coordinate changes (like panning) was also removed from the
damage iterators. The DRM core now expects drivers to call
drm_atomic_helper_check_plane_damage() to set ignore_damage_clips = true
when the source changes.
Because i915 implements a custom atomic check phase in intel_atomic_check()
that does not call drm_atomic_helper_check_planes() or
drm_atomic_helper_check_plane_damage(), ignore_damage_clips remains unset.
Will drm_atomic_helper_damage_merged() incorrectly return only partial
damage here when the plane is panned, missing the full update?
> - /* Incase helper fails, mark whole plane region as damage */
> + /* In case the helper fails, mark whole plane region as damage */
> *damage = drm_plane_state_src(&new_uapi_plane_state->uapi);
> }
[ ... ]
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index e138982dc91f6..22bab263d85d4 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
[ ... ]
> @@ -3018,8 +3018,7 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
> src = drm_plane_state_src(&new_plane_state->uapi);
> drm_rect_fp_to_int(&src, &src);
>
> - if (!drm_atomic_helper_damage_merged(&old_plane_state->uapi,
> - &new_plane_state->uapi, &damaged_area))
> + if (!drm_atomic_helper_damage_merged(&new_plane_state->uapi, &damaged_area))
[Severity: High]
Can this cause severe visual corruption for PSR2 selective fetch?
If intel_psr2_sel_fetch_update() no longer forces a full update on source
coordinate changes, it seems this might only fetch the small damaged area
(such as a blinking cursor) while leaving the rest of the panned screen
stale.
> continue;
>
> damaged_area.y1 += new_plane_state->uapi.dst.y1 - src.y1;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260530185716.65688-1-tzimmermann@suse.de?part=8
next prev parent reply other threads:[~2026-05-30 19:16 UTC|newest]
Thread overview: 17+ 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
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-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-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-05-30 18:53 ` [PATCH v4 05/10] drm/atomic_helper: Do not evaluate plane damage before atomic_check Thomas Zimmermann
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-05-30 18:53 ` [PATCH v4 07/10] drm/damage-helper: Remove old state from drm_atomic_helper_damage_iter_init() Thomas Zimmermann
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 [this message]
2026-05-30 18:53 ` [PATCH v4 09/10] drm/damage-helper: Rename state parameters in damage helpers Thomas Zimmermann
2026-05-30 18:53 ` [PATCH v4 10/10] drm/vmwgfx: Remove unused field struct vmwgfx_du_update_plane.old_state Thomas Zimmermann
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=20260530191602.550E61F00893@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox