Skip to content

Commit 0882ca4

Browse files
Yifan Zhaalexdeucher
authored andcommitted
drm/amd/amdkfd: Evict all queues even HWS remove queue failed
[Why] If reset is detected and kfd need to evict working queues, HWS moving queue will be failed. Then remaining queues are not evicted and in active state. After reset done, kfd uses HWS to termination remaining activated queues but HWS is resetted. So remove queue will be failed again. [How] Keep removing all queues even if HWS returns failed. It will not affect cpsch as it checks reset_domain->sem. v2: If any queue failed, evict queue returns error. v3: Declare err inside the if-block. Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Yifan Zha <Yifan.Zha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 42c854b) Cc: stable@vger.kernel.org
1 parent ded6ad4 commit 0882ca4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,11 +1230,13 @@ static int evict_process_queues_cpsch(struct device_queue_manager *dqm,
12301230
decrement_queue_count(dqm, qpd, q);
12311231

12321232
if (dqm->dev->kfd->shared_resources.enable_mes) {
1233-
retval = remove_queue_mes(dqm, q, qpd);
1234-
if (retval) {
1233+
int err;
1234+
1235+
err = remove_queue_mes(dqm, q, qpd);
1236+
if (err) {
12351237
dev_err(dev, "Failed to evict queue %d\n",
12361238
q->properties.queue_id);
1237-
goto out;
1239+
retval = err;
12381240
}
12391241
}
12401242
}

0 commit comments

Comments
 (0)