From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C031B606A32C for ; Wed, 2 Dec 2026 22:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Empmt+JC Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 08C7A10E694; Wed, 2 Dec 2026 22:34:26 +0000 (UTC) Received: from mail-yx1-f44.google.com (mail-yx1-f44.google.com [74.125.224.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FA6211257F for ; Wed, 2 Dec 2026 22:34:19 +0000 (UTC) Received: by mail-yx1-f44.google.com with SMTP id 956f58d0204a3-67da69e7c31so15581012d50.3 for ; Wed, 02 Dec 2026 14:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796250858; x=1796855658; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gYXaeTVqnw/xAO8nLCxG3M8kIjxmcqbKXxlTcOXDFrE=; b=Empmt+JCHxrZNMWamnRIXMlMDyEEvDEZDD37S94iEALqRbud4HaQmYzyKlY5Amkfi6 YHkIL5Tk3YTwqxiTGG+CiJZLy+Hb23/pPio0JSopOC5Qa8F4VPG4keGHLzkE9RUhTK4i eaOUNZJebSmZsffDbl3XzXLe7Snz8/QwO0x/ZrRDhorcBHY9jRz2kDbjCtOrndP4ZkA6 +8cyOHkG02zYPdItxRK9r0FZlWE9S5B+FsVCfjHgInbxNZ2nCwGub5GKFrXwR971CCLo cjn/sM23rK5kuqx1eFeZ20P+vDmTzgDKQHLyvSVYGBoAYxDXf4BXp54bdhp/g5ZnHJQI EQkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796250858; x=1796855658; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gYXaeTVqnw/xAO8nLCxG3M8kIjxmcqbKXxlTcOXDFrE=; b=aJ5SOkpGm5aElGqGCBSL/FCfrvAIa4i8QfIyAyVa957Zbv+41eU0iCfep4pjW27c6d 6JWZltk4xjmiVzE4v9cl8rAptVBH6C00rOM2wwLjIpAY0H6QLirt7oWQH/b2hIGNKPKR KCNHFcs29nxEO73w2wuJfa+4z/AcBL4EvJOqdn3A6a2nH30t4PZS+FDsAPLNpVCt7QUb Nrip75YCJ0qj8c22YuDHgtFRa445f/hIL12pcI8A8G2OYoKprK2rGpqjkCY3gWwemG0s kndLbXqP2snhjDyq9a+kchk+X3lIyenTPElhmYgm7IzZRHD6AaifewuGulGzM3ZGezZ9 FvoA== X-Forwarded-Encrypted: i=1; AL+hErHpMIGvJDgTi5NEVJdmbllta6YVBr/g/VHqg+o6Mi5mCuSr7+pWv18ubYiq6wPWEcEPmjIhfiLUpkM=@lists.freedesktop.org X-Gm-Message-State: APuU4Z82o9oBk+dbTDTUGUZ9y7AI20SdkDWhMTGVKjuAYewz/U7WoxPx 1883EpgJ1GuXYdi+32hvzU4cU+StXR+4uyFC6FsDHtbX2KX1PlU3wF8S X-Gm-Gg: AZFdTZefKDpGHEBX45SZm3KIF2BJR4iLrCtKvDY9NRK9KuCT73PapJWarQ0quVTc0QS I8H3dX4OcDg4hEEkZ7DePwgqZ1pI0MxwcDYoJ6VKG9TrOMmoS+oemJr5r0/K8+bK9HO4oYW8N09 bfOxTin0fpUso/XPSYputL+Nuu3PH0EW/VAh85/QLT6S/E8H1e57rsgTb1eTDA1MVzcorWJu1PJ vSzYl+E6LxEsjXDrhUasmWD1VFZTP8/lfexCJMnYlNVAUhVBEaOshgYA2Ie1XieIOH1Xcr3BrQu semIvi+KRuDP343Cr6aZENub503MoWmdjeKQwc3ZHTXcPAI+BckN1kRf/tTDmuSxwPLdlNgqgut /MYfqFY5emaYOSuX2/6kcrGvekD6IYQ4OG3y+YLuGfpnOYmcK2H2fEzC3NhH8gK245LHEIGQC64 QVXxyJ9XPg5hmljSluwHRoB83zpuMOkdttAW1PxyLOgmmDIFuo0gEOcVjfx8ZLPiqP2ND/Ce3yb WhwFLY1gcMMsWGFc7X68hOKMe0bs/M/7zal8JWVT0hjBOBbmNaOsub+VoxWzyoS4lRhzFZyiSWZ uUWvufXE4W4SmZVVpgXQiwFFxEPRLY7ByTVr5HUybr4OsM5KMx6BWlbx/P8SZyqQhYSpvpbAf5q PtQ3Nx6iVeD9Jt1R6mZ3dvjnxd7myTvkAYksgyo4HfqrbhMKZ3XI+JKARLGRrYTZGt2UD+2l/J3 0KeghPJZlHhEvcEAWAKA== X-Received: by 2002:a05:690e:12cd:b0:67d:bc89:3005 with SMTP id 956f58d0204a3-67df440f168mr20487376d50.37.1796250858194; Wed, 02 Dec 2026 14:34:18 -0800 (PST) Received: from localhost (107-220-129-194.lightspeed.chrlnc.sbcglobal.net. [107.220.129.194]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67df3378f59sm18006055d50.14.2026.12.02.14.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 14:34:17 -0800 (PST) From: Matt Turner Date: Wed, 02 Dec 2026 17:34:12 -0500 Subject: [PATCH 3/3] drm/amdgpu: don't unmap legacy queues through MES during reset X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-amdgpu-devcoredump-fixes-v1-3-59f622a29769@gmail.com> References: <20261202-amdgpu-devcoredump-fixes-v1-0-59f622a29769@gmail.com> In-Reply-To: <20261202-amdgpu-devcoredump-fixes-v1-0-59f622a29769@gmail.com> To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , David Airlie , Simona Vetter , Pierre-Eric Pelloux-Prayer , Le Ma , Lijo Lazar Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Matt Turner , Jatin Kataria X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1971; i=mattst88@gmail.com; h=from:subject:message-id; bh=IIhaWpcUX0Ged5riJYBRieKCdsY37vCuHN+vH5E4WW4=; b=owGbwMvMwCW25rVmCc8sv+mMp9WSGLIF5jycbf02RZHn5O4ljuv3uq19a/aswmHN4xWWk/cF6 9+dpB/o1fGRhUGMi2GmmCJL3HpFllltO5b6nJb+BTOHlQlkiLRIAwMQsDDw5SbmlRrpGOmZahvq GQIZOkbxEDk9Bo3M4uLS1CLdtIIih7z8ksSSzPy8Yr38gtS8gvQCvbTMtJKMjPyi4lSgEXp5qSW mro5uRoYGJpaOFmZOFo6mJs7OToZObo6Ozq5ORpbmJgbOlo4mrpbmDFycAjDXFCYwMkzcJDrb/e +f/ZVslv7WnrGd69VFExafKBHq+xj/Y/+uj6GMDM/2ygfvPZB01FQx78jn73/WTLPXKJ5zTKLsP pO7hXbuWm4A X-Developer-Key: i=mattst88@gmail.com; a=openpgp; fpr=3BB639E56F861FA2E86505690FDD682D974CA72A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 Signed-off-by: Matt Turner --- 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