From: Amber Lin <Amber.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <Jesse.Zhang@amd.com>
Cc: Amber Lin <Amber.Lin@amd.com>
Subject: [PATCH 2/2] drm/amdkfd: Remove extra function
Date: Wed, 17 Jun 2026 21:23:13 -0400 [thread overview]
Message-ID: <20260618012313.139892-2-Amber.Lin@amd.com> (raw)
In-Reply-To: <20260618012313.139892-1-Amber.Lin@amd.com>
recover_bad_queue_mes is not needed. Call reset_queues_mes directly.
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
---
.../drm/amd/amdkfd/kfd_device_queue_manager.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 4e60d9364e37..83be54372b18 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -72,11 +72,11 @@ static int allocate_sdma_queue(struct device_queue_manager *dqm,
struct queue *q, const uint32_t *restore_sdma_id);
static int reset_queues_on_hws_hang(struct device_queue_manager *dqm, bool is_sdma);
-static int recover_bad_queue_mes(struct device_queue_manager *dqm, struct queue *q);
static struct queue *find_queue_by_doorbell_offset(struct device_queue_manager *dqm,
u32 doorbell_offset);
static void set_queue_as_reset(struct device_queue_manager *dqm, struct queue *q,
struct qcm_process_device *qpd);
+static int reset_queues_mes(struct device_queue_manager *dqm, struct queue *q);
static inline
enum KFD_MQD_TYPE get_mqd_type_from_queue_type(enum kfd_queue_type type)
@@ -333,11 +333,12 @@ static int remove_queue_mes_on_reset_option(struct device_queue_manager *dqm, st
amdgpu_mes_unlock(&adev->mes);
up_read(&adev->reset_domain->sem);
+ /* If is_for_reset set, it is a mes internal cleanup */
if (!r || is_for_reset)
return r;
- /* remove_hw_queue failed. try to recover */
- r = recover_bad_queue_mes(dqm, q);
+ /* remove_hw_queue failure indicates a queue hang. reset the queue */
+ r = reset_queues_mes(dqm, q);
if (r && amdgpu_gpu_recovery) {
dev_err(adev->dev, "failed to remove queue from MES, doorbell=0x%x\n",
q->properties.doorbell_off);
@@ -488,16 +489,6 @@ static int reset_queues_mes(struct device_queue_manager *dqm, struct queue *q)
return r;
}
-static int recover_bad_queue_mes(struct device_queue_manager *dqm, struct queue *q)
-{
- struct amdgpu_device *adev = (struct amdgpu_device *)dqm->dev->adev;
- int r = 0;
-
- r = reset_queues_mes(dqm, q);
-
- return r;
-}
-
static void increment_queue_count(struct device_queue_manager *dqm,
struct qcm_process_device *qpd,
struct queue *q)
@@ -3269,7 +3260,7 @@ int kfd_dqm_suspend_bad_queue_mes(struct kfd_node *knode, u32 pasid, u32 doorbel
list_for_each_entry(q, &qpd->queues_list, list) {
if (q->doorbell_id == doorbell_id && q->properties.is_active) {
- recover_bad_queue_mes(dqm, q);
+ reset_queues_mes(dqm, q);
q->properties.is_evicted = true;
q->properties.is_active = false;
decrement_queue_count(dqm, qpd, q);
--
2.43.0
next prev parent reply other threads:[~2026-06-18 1:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 1:23 [PATCH 1/2] drm/amdgpu: Fix mes remove_hw_queue lock Amber Lin
2026-06-18 1:23 ` Amber Lin [this message]
2026-06-18 1:32 ` [PATCH 2/2] drm/amdkfd: Remove extra function Zhang, Jesse(Jie)
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=20260618012313.139892-2-Amber.Lin@amd.com \
--to=amber.lin@amd.com \
--cc=Jesse.Zhang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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.