mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	"Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
	"Le Ma" <le.ma@amd.com>, "Lijo Lazar" <lijo.lazar@amd.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	 linux-kernel@vger.kernel.org, Matt Turner <mattst88@gmail.com>,
	 Jatin Kataria <jkataria@netflix.com>
Subject: [PATCH 3/3] drm/amdgpu: don't unmap legacy queues through MES during reset
Date: Wed, 02 Dec 2026 17:34:12 -0500	[thread overview]
Message-ID: <20261202-amdgpu-devcoredump-fixes-v1-3-59f622a29769@gmail.com> (raw)
In-Reply-To: <20261202-amdgpu-devcoredump-fixes-v1-0-59f622a29769@gmail.com>

Commit 7b1ebbe856fc ("drm/amdgpu: Avoid kcq disable during reset")
made amdgpu_gfx_disable_kcq() and amdgpu_gfx_disable_kgq() skip the
KIQ unmap once a reset is in progress, since the reset tears down and
rebuilds the queues anyway. It did not cover the MES branch that
commit f7fb9d677faf ("drm/amdgpu/mes12: fix suspend issue") had added
to the same functions earlier.

When MES is hung, each of those unmap requests waits out the MES
submission timeout of about 2.1 seconds before failing, and the
failure is ignored, so recovery stalls for that long per queue for
nothing.

Skip the MES unmap during reset as well, matching the KIQ path.

Fixes: 7b1ebbe856fc ("drm/amdgpu: Avoid kcq disable during reset")
Suggested-by: Jatin Kataria <jkataria@netflix.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index c5a2dcff5058..0e9456b57577 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -586,6 +586,10 @@ int amdgpu_gfx_disable_kcq(struct amdgpu_device *adev, int xcc_id)
 	int j;
 
 	if (adev->enable_mes) {
+		/* As below for KIQ: the reset tears down and rebuilds the queues. */
+		if (amdgpu_in_reset(adev))
+			return 0;
+
 		for (i = 0; i < adev->gfx.num_compute_rings; i++) {
 			j = i + xcc_id * adev->gfx.num_compute_rings;
 			amdgpu_mes_unmap_legacy_queue(adev,
@@ -636,6 +640,10 @@ int amdgpu_gfx_disable_kgq(struct amdgpu_device *adev, int xcc_id)
 	int j;
 
 	if (adev->enable_mes) {
+		/* As below for KIQ: the reset tears down and rebuilds the queues. */
+		if (amdgpu_in_reset(adev))
+			return 0;
+
 		if (amdgpu_gfx_is_master_xcc(adev, xcc_id)) {
 			for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
 				j = i + xcc_id * adev->gfx.num_gfx_rings;

-- 
2.56.1


      parent reply	other threads:[~2026-12-02 22:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 22:34 [PATCH 0/3] drm/amdgpu: devcoredump and reset fixes Matt Turner
2026-12-02 22:34 ` [PATCH 1/3] drm/amdgpu: fix IB content read in the devcoredump Matt Turner
2026-12-02 22:34 ` [PATCH 2/3] drm/amdgpu: clear stale JPEG and VCN1 IP dump pointers Matt Turner
2026-12-02 22:34 ` Matt Turner [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=20261202-amdgpu-devcoredump-fixes-v1-3-59f622a29769@gmail.com \
    --to=mattst88@gmail.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=jkataria@netflix.com \
    --cc=le.ma@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=simona@ffwll.ch \
    /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

all inboxes | Powered by JetHome®