[Intel-xe] [PATCH v2 1/4] drm/xe: Fix xe_exec_queue_is_idle for parallel exec queues

Niranjana Vishwanathapura niranjana.vishwanathapura at intel.com
Mon Sep 18 04:54:17 UTC 2023


On Fri, Sep 15, 2023 at 04:34:42PM -0700, Matthew Brost wrote:
>Last little piece to support parallel exec queue is compute mode.
>
>Signed-off-by: Matthew Brost <matthew.brost at intel.com>
>---
> drivers/gpu/drm/xe/xe_exec_queue.c | 13 +++++++++++--
> 1 file 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 6725157d8c1d..eee64ba87d50 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;

Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>

>-- 
>2.34.1
>


More information about the Intel-xe mailing list