All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/amd/display: Don't use tiling flags anymore
Date: Wed, 15 Jul 2026 22:12:06 +0200	[thread overview]
Message-ID: <31315640.VsfAaAtOVx@timur-max> (raw)
In-Reply-To: <20260715114238.856321F000E9@smtp.kernel.org>

On 2026. július 15., szerda 13:42:38 közép-európai nyári idő sashiko-
bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider: - [High] Removing the `tiling_flags` check in
> `should_reset_plane` allows framebuffers with different DCC pitches or
> dimensions (but identical modifiers) to bypass DRM atomic check validation,
> leading to hardware corruption and stale DML calculations during commit. --

This is not an issue. DCC is not supported at all on GFX6-7 and is not 
supported by the display engine on GFX8. The code does not advertise any 
modifiers with DCC on GFX6-8 either.

> 
> --- Patch [4]: [PATCH 4/4] drm/amd/display: Don't use tiling flags anymore
> --- commit b71fc193d0b1254508d4ef4e5b1e90decbcba27a
> Author: Timur Kristóf <timur.kristof@gmail.com>
> 
> drm/amd/display: Don't use tiling flags anymore
> 
> This commit removes all code from amdgpu_dm that dealt with tiling flags,
> as all supported GPU generations now support DRM format modifiers. The
> legacy non-DC display code still relies on tiling flags.
> 
> > 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
> > c643cc5428577..2f7388c47d02a 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> 
> [ ... ]
> 
> > @@ -4279,7 +4277,6 @@ static void amdgpu_dm_commit_planes(struct
> > drm_atomic_state *state,> 
> >  		fill_dc_plane_info_and_addr(
> >  		
> >  			dm->adev, new_plane_state,
> > 
> > -			afb->tiling_flags,
> > 
> >  			&bundle->plane_infos[planes_count],
> >  			&bundle->flip_addrs[planes_count].address,
> >  			afb->tmz_surface);
> 
> [Severity: High]
> Since the return value of fill_dc_plane_info_and_addr() is ignored here,
> what happens if DCC validation fails due to missed dimension or pitch
> changes?

DCC is not supported by the display engine on GFX6-8 so there is no DCC 
validation.

> 
> Could this result in a zero-filled plane_info structure being sent to the
> hardware (for example, setting global_alpha to 0) and causing a black
> screen?

No, it couldn't.

> 
> [ ... ]
> 
> > @@ -6248,8 +6245,7 @@ static bool should_reset_plane(struct
> > drm_atomic_state *state,> 
> >  		new_afb = (struct amdgpu_framebuffer *)new_other_state-
>fb;
> >  		
> >  		/* Tiling and DCC changes also require bandwidth 
updates. */
> > 
> > -		if (old_afb->tiling_flags != new_afb->tiling_flags ||
> > -		    old_afb->base.modifier != new_afb->base.modifier)
> > +		if (old_afb->base.modifier != new_afb->base.modifier)
> > 
> >  			return true;
> >  	
> >  	}
> 
> [Severity: High]
> By removing the tiling_flags check here in should_reset_plane(), how do we
> ensure that framebuffers with identical modifiers but different DCC pitches
> or dimensions still trigger a validation reset?

The tiling flags are no longer used because they are converted to modifiers. 
Therefore, removing the tiling flag check is not changing the behavior of the 
code.

As I explained above, DCC is not supported by this HW.

Additionally, "identical modifiers but with different DCC pitches" would be 
illegal for DRM format modifiers.


> 
> If a user-space client flips between two framebuffers with the same format
> and source rectangle, but different backing buffer dimensions, it seems
> this might bypass DRM atomic check validation.

How?

> 
> Could this lead to DC hardware being programmed using stale Display Mode
> Logger (DML) calculations and watermarks, resulting in display corruption?

How?






  reply	other threads:[~2026-07-15 20:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 10:57 [PATCH 0/4] drm/amdgpu: Support DRM format modifiers on GFX6-8 (v2) Timur Kristóf
2026-07-15 10:57 ` [PATCH 1/4] drm/fourcc: Add modifiers for AMD GFX6-8 Timur Kristóf
2026-07-15 12:11   ` Christian König
2026-07-15 10:57 ` [PATCH 2/4] drm/amdgpu: Convert tiling flags to modifiers on GFX6-8 Timur Kristóf
2026-07-15 11:10   ` sashiko-bot
2026-07-15 20:33     ` Timur Kristóf
2026-07-15 10:57 ` [PATCH 3/4] drm/amd/display: Support DRM format " Timur Kristóf
2026-07-15 11:08   ` sashiko-bot
2026-07-15 20:18     ` Timur Kristóf
2026-07-15 10:57 ` [PATCH 4/4] drm/amd/display: Don't use tiling flags anymore Timur Kristóf
2026-07-15 11:42   ` sashiko-bot
2026-07-15 20:12     ` Timur Kristóf [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-13 20:43 [PATCH 0/4] drm/amdgpu: Support DRM format modifiers on GFX6-8 Timur Kristóf
2026-05-13 20:43 ` [PATCH 4/4] drm/amd/display: Don't use tiling flags anymore Timur Kristóf

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=31315640.VsfAaAtOVx@timur-max \
    --to=timur.kristof@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.