From mboxrd@z Thu Jan 1 00:00:00 1970 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 2F76CC9830D for ; Fri, 25 Sep 2026 04:53:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6575510F825; Fri, 25 Sep 2026 04:53:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Qw6sZOt6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id C1D4D10E44C for ; Fri, 25 Sep 2026 04:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1790312011; x=1821848011; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=px6ynpPMjNT0y5VOHVUdEiPj/pGJ5jNbWRhXzl0G4PA=; b=Qw6sZOt6S/CfS34KSSezjGgG6PfCFZOKMuzjSI73dJ2z7wbJiQ/bbc7a x+D5SSMNqECbjrYpkmQ1IvfByFq96/oFbuy7HmUOmL0/vNWC8CJt0DKKD ktVjh/PfM2KvPgRyeRdy2toS03Wsfpj9hjQ1TDY4YYFA6Wb0NV7WIpeNc R7nZpyyFbmWMnyMzRHxlGB9yzcWD2sf4UvAWgVjhHjeWU7jRioJHPl4CR n1FCNDL3QtKObmYpEDYm1ofgRwvYaA/PKTb+YkKEoU4+CZA7UgJoYJDTm HMmo3vv7JCmhxQdKhaTBbONFBoxLGYjF62j1nn6qvB5fxsCZFmlRp5rjb w==; X-CSE-ConnectionGUID: B+ly9ppzSOmZTJucqRaRlw== X-CSE-MsgGUID: 0jIUVdZ+TKSX5iv+QvEv2w== X-IronPort-AV: E=McAfee;i="6800,10657,11915"; a="90156217" X-IronPort-AV: E=Sophos;i="6.27,121,1787036400"; d="scan'208";a="90156217" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2026 21:53:27 -0700 X-CSE-ConnectionGUID: gmCzx2NbTju+zv81AUA0Ig== X-CSE-MsgGUID: MG4lmc6fQLevSxEbp3pZUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,121,1787036400"; d="scan'208";a="312155505" Received: from gsse-cloud1.jf.intel.com ([10.54.39.91]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2026 21:53:26 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org Cc: Stuart Summers Subject: [PATCH v7 04/24] drm/xe: Decouple exec queue idle check from LRC Date: Thu, 24 Sep 2026 21:53:00 -0700 Message-Id: <20260925045320.1325860-5-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260925045320.1325860-1-matthew.brost@intel.com> References: <20260925045320.1325860-1-matthew.brost@intel.com> 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" 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 --- 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 e63559a2f582..7bbb31431900 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -1580,20 +1580,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.34.1