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 11048CD37B1 for ; Fri, 15 Sep 2023 23:20:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD47010E6B1; Fri, 15 Sep 2023 23:20:11 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B20610E09C for ; Fri, 15 Sep 2023 23:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694820009; x=1726356009; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=H5bt8PZhVYDINoujYp7/k3j6ziiySeHEhNmn3VMZ18I=; b=dGfDRGa9po2r2LEK7khwbSvS7ejW5khGwgYKbNTUi2GgaGxakBtI0DDZ aQ3HoDm0sphRwrdgZX8wb4e3th+jvZPeN8i+YLe/lszLgNv//30Fn5/2x B21+1Rkd6SaTtGnYpgUDMK8aBlSJbcKsdh5IzibKVVMbQmX/oUtvtyQ8g uCdfXx/yItAoSQQyDg10OIE/js5da5K1SM3LPv0ySKw+tG34OUOJco9MP jNG6ruWQl6/fjWOo7y0qU58exKlviOduHEgpUNdWEBWrTS40QdHp1lCTz 2rOWc07AqALBNB1KjZi19yRor1E04KykMVLbua7iWkqEIjrbwTZZcV+en A==; X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="382095164" X-IronPort-AV: E=Sophos;i="6.02,150,1688454000"; d="scan'208";a="382095164" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 16:20:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="835374311" X-IronPort-AV: E=Sophos;i="6.02,150,1688454000"; d="scan'208";a="835374311" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 16:20:07 -0700 From: Matthew Brost To: Date: Fri, 15 Sep 2023 16:20:19 -0700 Message-Id: <20230915232021.2241094-1-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [PATCH 1/3] drm/xe: Fix xe_exec_queue_is_idle for parallel exec queues 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" Last little piece to support parallel exec queue is compute mode. Signed-off-by: Matthew Brost --- 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; -- 2.34.1