From: sashiko-bot@kernel.org
To: "Alex Deucher" <alexander.deucher@amd.com>,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH V2] drm/amdgpu/gfx11: don't enable gfx on pipe1 with tmz
Date: Thu, 19 Nov 2026 19:33:20 +0000 [thread overview]
Message-ID: <sashiko-outbox-223934@kernel.org> (raw)
In-Reply-To: <20261119191202.190939-1-alexander.deucher@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/amdgpu/gfx11: dead tmz_enabled check in
gfx_v11_0_early_init()
--
commit 7adeab4007af8d1d45d18ee604343d9e2fa08024
Author: Alex Deucher <alexander.deucher@amd.com>
drm/amdgpu/gfx11: don't enable gfx on pipe1 with tmz
This commit restricts GFX11 to a single GFX pipe and ring when TMZ is
enabled, because the firmware does not support TMZ on pipe 1.
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> index 5d068a9d9c72c..d4ea4769efa0b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
[ ... ]
> @@ -5302,10 +5303,15 @@ static int gfx_v11_0_early_init(struct amdgpu_ip_block *ip_block)
> adev->gfx.num_compute_rings = 0;
> } else {
> /* rs64 only supports one gfx pipe */
> - if (adev->gfx.rs64_enable)
> + if (adev->gfx.rs64_enable) {
> adev->gfx.num_gfx_rings = 1;
> - else
> - adev->gfx.num_gfx_rings = GFX11_NUM_GFX_RINGS;
> + } else {
> + /* FW doesn't support TMZ on gfx pipe1 */
> + if (adev->gmc.tmz_enabled)
> + adev->gfx.num_gfx_rings = 1;
> + else
> + adev->gfx.num_gfx_rings = GFX11_NUM_GFX_RINGS;
> + }
> adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev),
> AMDGPU_MAX_COMPUTE_RINGS);
> }
[Severity: Low]
Can adev->gmc.tmz_enabled ever be true in gfx_v11_0_early_init()?
In amdgpu_device_init(), amdgpu_device_ip_early_init() runs before
amdgpu_gmc_tmz_set() initializes adev->gmc.tmz_enabled:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:amdgpu_device_init() {
...
/* early init functions */
r = amdgpu_device_ip_early_init(adev);
if (r)
return r;
...
/* Enable TMZ based on IP_VERSION */
amdgpu_gmc_tmz_set(adev);
...
}
Because adev->gmc.tmz_enabled is still false here,
gfx_v11_0_early_init() always sets adev->gfx.num_gfx_rings to
GFX11_NUM_GFX_RINGS and gfx_v11_0_set_ring_funcs() populates
gfx_ring[1].funcs before gfx_v11_0_sw_init() later clamps
num_pipe_per_me and num_gfx_rings back to 1.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119191202.190939-1-alexander.deucher@amd.com?part=1
prev parent reply other threads:[~2026-11-19 19:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:12 [PATCH V2] drm/amdgpu/gfx11: don't enable gfx on pipe1 with tmz Alex Deucher
2026-11-19 19:33 ` sashiko-bot [this message]
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=sashiko-outbox-223934@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox