From: sashiko-bot@kernel.org
To: "Yifan Zhang" <yifan1.zhang@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: skip PCI slot reset and resume if the device was not prepared
Date: Wed, 02 Dec 2026 09:26:25 +0000 [thread overview]
Message-ID: <sashiko-outbox-245300@kernel.org> (raw)
In-Reply-To: <20261202091435.3183770-1-yifan1.zhang@amd.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm/amdgpu: wrong device used for KFD init in
amdgpu_device_gpu_resume() [1]
--
commit 117b3201e4109fecb8f7e0d137a2aaccfd1dfee9
Author: Lejun Zhu <lejun.zhu@amd.com>
drm/amdgpu: skip PCI slot reset and resume if the device was not prepared
This commit tracks whether amdgpu_pci_error_detected() halted the device
and acquired the reset domain lock so that amdgpu_pci_slot_reset() and
amdgpu_pci_resume() do not attempt recovery or unlock a reset domain lock
they do not hold.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 7cf3a4cbac27c..b2889f59be291 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
[ ... ]
> @@ -6467,6 +6486,7 @@ void amdgpu_pci_resume(struct pci_dev *pdev)
> amdgpu_device_sched_resume(&device_list, NULL, NULL);
> amdgpu_device_gpu_resume(adev, &device_list, false);
> amdgpu_device_recovery_put_reset_lock(adev, &device_list);
> + adev->pcie_reset_ctx.reset_prepared = false;
[Severity: High]
This problem wasn't introduced by this patch, but in
amdgpu_device_gpu_resume() [1], should the KFD initialization check
and amdgpu_amdkfd_device_init() call use the loop iterator tmp_adev instead
of adev?
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:amdgpu_device_gpu_resume() {
...
list_for_each_entry(tmp_adev, device_list, reset_list) {
if (!need_emergency_restart && !amdgpu_sriov_vf(tmp_adev))
amdgpu_amdkfd_post_reset(tmp_adev);
if (!adev->kfd.init_complete)
amdgpu_amdkfd_device_init(adev);
...
}
In a multi-GPU reset recovery, checking and initializing adev on each
iteration leaves KFD uninitialized on any other device in device_list
where kfd.init_complete is false.
[1] https://sashiko.dev/#/bug/linux-5cf51b39-dfd5-4eaf-89c5-a3b47f0fd56b
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202091435.3183770-1-yifan1.zhang@amd.com?part=1
prev parent reply other threads:[~2026-12-02 9:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 9:14 [PATCH] drm/amdgpu: skip PCI slot reset and resume if the device was not prepared Yifan Zhang
2026-12-02 9:26 ` 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-245300@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yifan1.zhang@amd.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.