All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Timur Kristóf" <timur.kristof@gmail.com>
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 11:42:38 +0000	[thread overview]
Message-ID: <20260715114238.856321F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260715105757.13125-5-timur.kristof@gmail.com>

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.
--

--- 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?

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?

[ ... ]

> @@ -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?

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.

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

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260715105757.13125-1-timur.kristof@gmail.com?part=4

  reply	other threads:[~2026-07-15 11:42 UTC|newest]

Thread overview: 10+ 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 10:57 ` [PATCH 3/4] drm/amd/display: Support DRM format " Timur Kristóf
2026-07-15 11:08   ` sashiko-bot
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 [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=20260715114238.856321F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=timur.kristof@gmail.com \
    /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.