From: Matt Turner <mattst88@gmail.com>
To: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Sunil Khatri" <sunil.khatri@amd.com>,
"Trigger Huang" <Trigger.Huang@amd.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Matt Turner <mattst88@gmail.com>
Subject: [PATCH 01/14] drm/amdgpu: dump the IP state of each device in an XGMI hive
Date: Wed, 02 Dec 2026 17:36:07 -0500 [thread overview]
Message-ID: <20261202-amdgpu-devcoredump-v1-1-3dfa0e033b97@gmail.com> (raw)
In-Reply-To: <20261202-amdgpu-devcoredump-v1-0-3dfa0e033b97@gmail.com>
amdgpu_device_pre_asic_reset() runs for every device in the reset list,
but dumps the IP state of reset_context->reset_req_dev rather than the
device it was called for. This was carried over from when the dump was
done once in amdgpu_do_asic_reset() for the first device in the list.
For an XGMI hive, the requesting device is first in the list, so the
dump for every later device dumps the requesting device again after its
IP blocks have been suspended, replacing its registers with the state
after suspend. The other devices are never dumped, yet
amdgpu_device_reinit_after_reset() emits a coredump for each of them.
Dump the device being prepared.
Fixes: 13d8850a3387 ("drm/amdgpu: trigger ip dump before suspend of IP's")
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index d0ed92761ef9..85a22af69ba4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5133,7 +5133,6 @@ int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,
{
struct amdgpu_job *job = NULL;
struct dma_fence *fence = NULL;
- struct amdgpu_device *tmp_adev = reset_context->reset_req_dev;
bool need_full_reset =
test_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
int i, r;
@@ -5199,13 +5198,13 @@ int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,
need_full_reset = true;
if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags)) {
- dev_info(tmp_adev->dev, "Dumping IP State\n");
+ dev_info(adev->dev, "Dumping IP State\n");
/* Trigger ip dump before we reset the asic */
- for (i = 0; i < tmp_adev->num_ip_blocks; i++)
- if (tmp_adev->ip_blocks[i].version->funcs->dump_ip_state)
- tmp_adev->ip_blocks[i].version->funcs
- ->dump_ip_state((void *)&tmp_adev->ip_blocks[i]);
- dev_info(tmp_adev->dev, "Dumping IP State Completed\n");
+ for (i = 0; i < adev->num_ip_blocks; i++)
+ if (adev->ip_blocks[i].version->funcs->dump_ip_state)
+ adev->ip_blocks[i].version->funcs
+ ->dump_ip_state((void *)&adev->ip_blocks[i]);
+ dev_info(adev->dev, "Dumping IP State Completed\n");
}
if (need_full_reset)
--
2.56.1
next prev parent reply other threads:[~2026-12-02 22:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 22:36 [PATCH 00/14] drm/amdgpu: capture more of the hang state in the devcoredump Matt Turner
2026-12-02 22:36 ` Matt Turner [this message]
2026-12-02 22:36 ` [PATCH 02/14] drm/amdgpu: only give the hung job to its own device's coredump Matt Turner
2026-12-02 22:36 ` [PATCH 03/14] drm/amdgpu: don't overwrite the IP state while a coredump is formatted Matt Turner
2026-12-02 22:36 ` [PATCH 04/14] drm/amdgpu: take a coredump before resets done by a reset handler Matt Turner
2026-12-02 22:36 ` [PATCH 05/14] drm/amdgpu: copy the VM fault info when the hang is detected Matt Turner
2026-12-02 22:36 ` [PATCH 06/14] drm/amdgpu/gfx10-12: dump CP_STAT and the IB2 state of each gfx queue Matt Turner
2026-12-02 22:36 ` [PATCH 07/14] drm/amdgpu: copy the IB contents before formatting the devcoredump Matt Turner
2026-12-02 22:36 ` [PATCH 08/14] drm/amdgpu: copy the IB contents when the hang is detected Matt Turner
2026-12-02 22:36 ` [PATCH 09/14] drm/amdgpu: record the submitting thread of the hung job in the coredump Matt Turner
2026-12-02 22:36 ` [PATCH 10/14] drm/amdgpu: dump the unsignaled fences of each ring " Matt Turner
2026-12-02 22:36 ` [PATCH 11/14] drm/amdgpu: report dropped devcoredumps Matt Turner
2026-12-02 22:36 ` [PATCH 12/14] drm/amdgpu: list the VM mappings of the hung job in the coredump Matt Turner
2026-12-02 22:36 ` [PATCH 13/14] drm/amdgpu: add AMDGPU_VM_PAGE_DUMP to include BOs " Matt Turner
2026-12-02 22:36 ` [PATCH 14/14] drm/amdgpu: bump the devcoredump version Matt Turner
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=20261202-amdgpu-devcoredump-v1-1-3dfa0e033b97@gmail.com \
--to=mattst88@gmail.com \
--cc=Trigger.Huang@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=sunil.khatri@amd.com \
--cc=tzimmermann@suse.de \
/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.