Skip to content

Commit 42c854b

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>
1 parent 760632f commit 42c854b

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
@@ -1221,11 +1221,13 @@ static int evict_process_queues_cpsch(struct device_queue_manager *dqm,
12211221
decrement_queue_count(dqm, qpd, q);
12221222

12231223
if (dqm->dev->kfd->shared_resources.enable_mes) {
1224-
retval = remove_queue_mes(dqm, q, qpd);
1225-
if (retval) {
1224+
int err;
1225+
1226+
err = remove_queue_mes(dqm, q, qpd);
1227+
if (err) {
12261228
dev_err(dev, "Failed to evict queue %d\n",
12271229
q->properties.queue_id);
1228-
goto out;
1230+
retval = err;
12291231
}
12301232
}
12311233
}

0 commit comments

Comments
 (0)