From: sashiko-bot@kernel.org
To: "Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/3] drm/amdgpu: delay ttm buffer func enablement on xgmi
Date: Wed, 17 Jun 2026 13:52:55 +0000 [thread overview]
Message-ID: <20260617135255.EDCFC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260617132835.12306-2-pierre-eric.pelloux-prayer@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The relocated call to amdgpu_ttm_enable_buffer_funcs() silently fails due to the amdgpu_in_reset() guard, leaving TTM DMA permanently disabled.
--
commit 61a1713a716e72510eef36a97d31d040637c47f6
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
drm/amdgpu: delay ttm buffer func enablement on xgmi
When amdgpu_init_minimal_xgmi is used, SDMA engines init is delayed so
amdgpu_ttm_enable_buffer_funcs must be called later. This commit moves
the call into amdgpu_device_reinit_after_reset to avoid initialization
failures.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 57e10afb4714d..53150fe553508 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
[ ... ]
> @@ -5320,6 +5319,8 @@ int amdgpu_device_reinit_after_reset(struct amdgpu_reset_context *reset_context)
> r = -EAGAIN;
> goto end;
> }
> +
> + amdgpu_ttm_enable_buffer_funcs(tmp_adev);
[Severity: High]
This isn't a bug introduced by this patch, but doesn't this relocated call
silently fail due to the amdgpu_in_reset() guard?
Because amdgpu_device_reinit_after_reset() executes within a hardware reset
context, the in_gpu_reset flag is set. Looking at
amdgpu_ttm_enable_buffer_funcs() in drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c,
there is an early return guard for this:
if (!adev->mman.initialized || amdgpu_in_reset(adev) ||
adev->mman.buffer_funcs_enabled || adev->gmc.is_app_apu)
return;
Will this cause the function to silently abort, leaving TTM DMA permanently
disabled and forcing all VRAM migrations to fallback to slow CPU copies?
Also, by placing the call at the very end of amdgpu_device_reinit_after_reset(),
it executes after drm_client_dev_resume(). Would any VRAM migrations triggered
by fbdev restore run without hardware DMA even if the early return was bypassed?
> }
>
> if (r)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260617132835.12306-1-pierre-eric.pelloux-prayer@amd.com?part=2
next prev parent reply other threads:[~2026-06-17 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 13:28 [PATCH v2 1/3] drm/amdgpu: don't disable ttm buffer funcs on reset Pierre-Eric Pelloux-Prayer
2026-06-17 13:28 ` [PATCH v2 2/3] drm/amdgpu: delay ttm buffer func enablement on xgmi Pierre-Eric Pelloux-Prayer
2026-06-17 13:52 ` sashiko-bot [this message]
2026-06-17 13:28 ` [PATCH v2 3/3] drm/amdgpu: remove useless enable/disable of ttm buffer funcs Pierre-Eric Pelloux-Prayer
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=20260617135255.EDCFC1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=pierre-eric.pelloux-prayer@amd.com \
--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.