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 0093C1048928 for ; Sat, 28 Feb 2026 01:35:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA98D10EC57; Sat, 28 Feb 2026 01:35:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="EaPEgu8l"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id D882E10E1DA for ; Sat, 28 Feb 2026 01:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772242509; x=1803778509; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K5xMfGsAGYqr5HVA718DFTDkcqcuy3OxI8NKRSLbJTw=; b=EaPEgu8l33tjZTQl42H74iGviAYLsGD/6uC4ayNfJuflahIyaGHyhlRY wUd+jG8nleB/m1nbTfrFmMfo3Lu+7n0dI2y+OO/zjihmL9UHpC5yhKnhS 2BKu5ZrKm3Rk1OTpLB8Ei1eetVjGLtaWVdfnJmaCRx+B2TLYiZcH0sCcl njHcNvABZG28q4Ge6Xhz3XJni8FsvwiZe/874FOMj/ho6lHlPG0ZUlMOT B7vkHOiPp+uMzRSeSr/nq2kibbEaHUnt6zy+iE5Jv+SalRXcZ6RiehRju b/OoBmTMM5/NWMF1Ig8BPOGVX5G2/s8B5+N/5Mkw/XKhGGE6hjDxJSFNa A==; X-CSE-ConnectionGUID: Q6sfeqz/QTu0XkwchzmeLQ== X-CSE-MsgGUID: jRT+6GRyQEOIbRlq/yp5VA== X-IronPort-AV: E=McAfee;i="6800,10657,11714"; a="83966342" X-IronPort-AV: E=Sophos;i="6.21,315,1763452800"; d="scan'208";a="83966342" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2026 17:35:06 -0800 X-CSE-ConnectionGUID: URI2PxfrTxyA96CED2lQgg== X-CSE-MsgGUID: tu3+1NV3Tqq3eoVd/GUrRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,315,1763452800"; d="scan'208";a="213854840" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2026 17:35:06 -0800 From: Matthew Brost To: intel-xe@lists.freedesktop.org Cc: stuart.summers@intel.com, arvind.yadav@intel.com, himal.prasad.ghimiray@intel.com, thomas.hellstrom@linux.intel.com, francois.dugast@intel.com Subject: [PATCH v3 03/25] drm/xe: Decouple exec queue idle check from LRC Date: Fri, 27 Feb 2026 17:34:39 -0800 Message-Id: <20260228013501.106680-4-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260228013501.106680-1-matthew.brost@intel.com> References: <20260228013501.106680-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 --- 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 2d0e73a6a6ee..b3f700a9d425 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -1382,20 +1382,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