Skip to content

Commit c8b0acd

Browse files
committed
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]>
1 parent b982cba commit c8b0acd

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
@@ -1819,8 +1819,13 @@ void xe_guc_submit_stop(struct xe_guc *guc)
18191819

18201820
mutex_lock(&guc->submission_state.lock);
18211821

1822-
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
1822+
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q) {
1823+
/* Prevent redundant attempts to stop parallel queues */
1824+
if (q->guc->id != index)
1825+
continue;
1826+
18231827
guc_exec_queue_stop(guc, q);
1828+
}
18241829

18251830
mutex_unlock(&guc->submission_state.lock);
18261831

@@ -1858,8 +1863,13 @@ int xe_guc_submit_start(struct xe_guc *guc)
18581863

18591864
mutex_lock(&guc->submission_state.lock);
18601865
atomic_dec(&guc->submission_state.stopped);
1861-
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
1866+
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q) {
1867+
/* Prevent redundant attempts to start parallel queues */
1868+
if (q->guc->id != index)
1869+
continue;
1870+
18621871
guc_exec_queue_start(q);
1872+
}
18631873
mutex_unlock(&guc->submission_state.lock);
18641874

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

0 commit comments

Comments
 (0)