Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8476CD6E77 for ; Thu, 4 Jun 2026 16:06:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 912BE11A15B; Thu, 4 Jun 2026 16:06:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=lankhorst.se header.i=@lankhorst.se header.b="mIPea+CQ"; dkim-atps=neutral Received: from lankhorst.se (unknown [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id CEBFD11A15B for ; Thu, 4 Jun 2026 16:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lankhorst.se; s=default; t=1780589215; bh=vAlkF0Irui5xD49fLNfN+g2exBdo5Olo42vAIwA1IU4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mIPea+CQSttlSepf7YmI6OFS6lSuoDPgDmPU8Dk0pGMWWS41C9yN2ULLXhgEEFGVs f6H3OC9js5rM/J4ufNM2hVWxuhw8Pvdv3dfdhCUcMG3vvniUlqIiUlcM7mbQGFVzBz +KYutFtPBKT57QxEPNWXvZkSdEQcJXpfjSlahRn5chjKOfmFO2uq3sSFoLLPiedicQ 7ASKulW4REkIr9gURterlAZXCgnRrRs0aWEZGN9o98Bd0anTa5RzzKBMG4bMapFRNZ WdWC875wj7DIRF7zZG/7D0Evfccz0zefE5JOlg+t7NyMT3HW2U7rxqydeBd8N9hcDY 3+v1ZOnBsAxiA== From: Maarten Lankhorst To: intel-xe@lists.freedesktop.org Subject: [CI 03/24] drm/xe: Decouple exec queue idle check from LRC Date: Thu, 4 Jun 2026 18:06:32 +0200 Message-ID: <20260604160655.50036-4-dev@lankhorst.se> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260604160655.50036-1-dev@lankhorst.se> References: <20260604160655.50036-1-dev@lankhorst.se> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" From: Matthew Brost We already maintain a job count for each exec queue, so simplify the idle check to rely on the job count rather than the LRC state. This decouples exec queues from LRC-based backends and avoids unnecessarily coupling idle detection to backend-specific implementation details. Signed-off-by: Matthew Brost Reviewed-by: Stuart Summers Link: https://patch.msgid.link/20260228013501.106680-4-matthew.brost@intel.com Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/xe/xe_exec_queue.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index 1b5ca3ce578a4..0ba8d79555b3b 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -1504,20 +1504,7 @@ bool xe_exec_queue_is_lr(struct xe_exec_queue *q) */ bool xe_exec_queue_is_idle(struct xe_exec_queue *q) { - 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; + return !atomic_read(&q->job_cnt); } /** -- 2.53.0