diff options
author | Matthew Brost <[email protected]> | 2023-09-20 15:29:27 -0400 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2023-12-21 11:43:10 -0500 |
commit | 5009d554e0d501741de1411db797a593a6fa94bb (patch) | |
tree | 55fa28f010c2f1c35d601ea3cc8ca7ade0abc65e | |
parent | 924e6a9789a05ef01ffdf849aa3a3c75f5a29a8b (diff) |
drm/xe: Fix xe_exec_queue_is_idle for parallel exec queues
Last little piece to support parallel exec queue is compute mode.
Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Niranjana Vishwanathapura <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r-- | drivers/gpu/drm/xe/xe_exec_queue.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index 23789122b5b1..c88acecc3a90 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -867,8 +867,17 @@ bool xe_exec_queue_ring_full(struct xe_exec_queue *q) */ bool xe_exec_queue_is_idle(struct xe_exec_queue *q) { - if (XE_WARN_ON(xe_exec_queue_is_parallel(q))) - return false; + if (xe_exec_queue_is_parallel(q)) { + int i; + + for (i = 0; i < q->width; ++i) { + if (xe_lrc_seqno(&q->lrc[i]) != + q->lrc[i].fence_ctx.next_seqno - 1) + return false; + } + + return true; + } return xe_lrc_seqno(&q->lrc[0]) == q->lrc[0].fence_ctx.next_seqno - 1; |