Skip to content

Commit cdc2102

Browse files
nirmoylucasdemarchi
authored andcommitted
drm/xe: Don't restart parallel queues multiple times on GT reset
In case of parallel submissions multiple GuC id will point to the same exec queue and on GT reset such exec queues will get restarted multiple times which is not desirable. v2: don't use exec_queue_enabled() which could race, do the same for xe_guc_submit_stop (Matt B) Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2295 Cc: Jonathan Cavitt <[email protected]> Cc: Himal Prasad Ghimiray <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Tejas Upadhyay <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Nirmoy Das <[email protected]> (cherry picked from commit c8b0acd) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 9c1813b commit cdc2102

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

drivers/gpu/drm/xe/xe_guc_submit.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,8 +1726,13 @@ void xe_guc_submit_stop(struct xe_guc *guc)
17261726

17271727
mutex_lock(&guc->submission_state.lock);
17281728

1729-
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
1729+
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q) {
1730+
/* Prevent redundant attempts to stop parallel queues */
1731+
if (q->guc->id != index)
1732+
continue;
1733+
17301734
guc_exec_queue_stop(guc, q);
1735+
}
17311736

17321737
mutex_unlock(&guc->submission_state.lock);
17331738

@@ -1765,8 +1770,13 @@ int xe_guc_submit_start(struct xe_guc *guc)
17651770

17661771
mutex_lock(&guc->submission_state.lock);
17671772
atomic_dec(&guc->submission_state.stopped);
1768-
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
1773+
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q) {
1774+
/* Prevent redundant attempts to start parallel queues */
1775+
if (q->guc->id != index)
1776+
continue;
1777+
17691778
guc_exec_queue_start(q);
1779+
}
17701780
mutex_unlock(&guc->submission_state.lock);
17711781

17721782
wake_up_all(&guc->ct.wq);

0 commit comments

Comments
 (0)