Linux-HyperV List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Thomas Zimmermann" <tzimmermann@suse.de>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v4 03/10] drm/ingenic: Remove calls to drm_atomic_helper_check_plane_damage()
Date: Sat, 30 May 2026 19:05:44 +0000	[thread overview]
Message-ID: <20260530190544.C7DCE1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260530185716.65688-4-tzimmermann@suse.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Setting `crtc_state->mode_changed = true` inside `plane_atomic_check` without re-calling `drm_atomic_helper_check_modeset()` bypasses necessary modeset validations and state updates, leading to incomplete modesets.
--

commit 0b5b8aa5c5b9f98bc80329fb6bac6de5430060f3
Author: Thomas Zimmermann <tzimmermann@suse.de>

drm/ingenic: Remove calls to drm_atomic_helper_check_plane_damage()

Atomic helpers call drm_atomic_helper_check_plane_damage() after the
atomic_check anyway. Remove the calls from the planes' atomic_check.

> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
> index 42c86f195c66b..e99b44e3ac923 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
[ ... ]
> @@ -519,9 +519,6 @@ static int ingenic_drm_plane_atomic_check(struct drm_plane *plane,
>  	     old_plane_state->fb->format->format != new_plane_state->fb->format->format))
>  		crtc_state->mode_changed = true;
>  

[Severity: High]
This is a pre-existing issue, but does setting crtc_state->mode_changed to
true here in ingenic_drm_plane_atomic_check() bypass necessary validations?

The DRM core documentation notes that if drivers set mode_changed = true
during the plane check, they must re-call drm_atomic_helper_check_modeset().
Since the ingenic driver assigns drm_atomic_helper_check() directly to its
global .atomic_check hook, check_modeset() runs before check_planes().

If a modeset check is not re-evaluated after planes alter the modeset
requirement, affected connectors and bridges might never be added to the
atomic state via drm_atomic_add_affected_connectors().

Will this cause the display pipeline to skip bridge and encoder modesets
during the commit phase, potentially desynchronizing the output?

> -	if (priv->soc_info->map_noncoherent)
> -		drm_atomic_helper_check_plane_damage(state, new_plane_state);
> -
>  	return 0;
>  }

> diff --git a/drivers/gpu/drm/ingenic/ingenic-ipu.c b/drivers/gpu/drm/ingenic/ingenic-ipu.c
> index 56143a191f361..fd17c642c7ac5 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-ipu.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-ipu.c
[ ... ]
> @@ -611,7 +611,7 @@ static int ingenic_ipu_plane_atomic_check(struct drm_plane *plane,
>  		return -EINVAL;
>  
>  	if (!osd_changed(new_plane_state, old_plane_state))
> -		goto out_check_damage;
> +		return 0;
>  
>  	crtc_state->mode_changed = true;
>  

[Severity: High]
This is also a pre-existing issue, but similar to the above, does setting
crtc_state->mode_changed to true here in ingenic_ipu_plane_atomic_check()
result in the same missing validation?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260530185716.65688-1-tzimmermann@suse.de?part=3

  reply	other threads:[~2026-05-30 19:05 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 [this message]
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
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=20260530190544.C7DCE1F00893@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