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 F0F3BCD1288 for ; Wed, 3 Apr 2024 19:35:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B025E112E66; Wed, 3 Apr 2024 19:35:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="PEIfqwjL"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 145F9112E64 for ; Wed, 3 Apr 2024 19:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712172910; x=1743708910; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ocGXMcNBjQT8tyTLRerdy3PZ56anMY46S2we0mQ9lG8=; b=PEIfqwjLK6XatvLBxmMxu22qEcOfi4m9+mx8t4D3Kwb3r3yXUhHb+t7T bYmCsy+gmLhyaSl8BLydFwAnOTC6CT8DedrYMs5xde4k6nhPG7dsioXh8 Iy50bs9vXTZ8hP9DdVnCBPSjMTlugwglDn6Ufi26xcUO9sbOpEfMatEe/ WynvBjzMZPH4SU7nL1YspziwZsnJUB9hyElx5RXgWG3i5iyW1R8ivEPmz cM8A6JkrQxx/UgWoPIB2+O5mN2WWN+/1EshWNOrGQ6ngCQ7ANc6Nt1f7k Y8Uac7P8F59w4piaXJjUCETnq/tmTGWsPj7/IEquDb9gGn+UYutGg/ES/ Q==; X-CSE-ConnectionGUID: qxJ7UKeJSmW9x6WqHky45A== X-CSE-MsgGUID: gLp5KRXqTXyVAW5xNvQfXg== X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="7296486" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="7296486" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 12:35:09 -0700 X-CSE-ConnectionGUID: o0B0ivHHRvW4KrfPnZyzQw== X-CSE-MsgGUID: ijU/Ux69SRmYHvDnk/j4Dw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="23030547" Received: from dut-internal-9dd7.jf.intel.com ([10.165.21.194]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 12:35:08 -0700 From: Jonathan Cavitt To: intel-xe@lists.freedesktop.org Cc: saurabhg.gupta@intel.com, jonathan.cavitt@intel.com, matthew.brost@intel.com, lucas.demarchi@intel.com, john.c.harrison@intel.com Subject: [PATCH v2 2/3] drm/xe/xe_guc_submit: Allow lr exec queues to be banned Date: Wed, 3 Apr 2024 12:19:49 -0700 Message-Id: <20240403191950.242642-2-jonathan.cavitt@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240403191950.242642-1-jonathan.cavitt@intel.com> References: <20240403191950.242642-1-jonathan.cavitt@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" LR queues currently don't get banned during a GT/GuC reset because they lack a job. Though they don't have a job to detect the reset status of, it's still possible to tell when they should be banned by looking at the LRC: if the LRC head and tail don't match, then the exec queue should be banned and cleaned up. This also requires swapping the usage of xe_sched_tdr_queue_imm with xe_guc_exec_queue_trigger_cleanup, as the former is specific to non-lr exec queues. Suggested-by: Matthew Brost Signed-off-by: Jonathan Cavitt Reviewed-by: Matthew Brost --- v2: - Fix Subject line - Modify change slightly to remove need for "ban" boolean drivers/gpu/drm/xe/xe_guc_submit.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index 294f40ab6aaf1..c93ba4bc611b8 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -1428,12 +1428,16 @@ static void guc_exec_queue_stop(struct xe_guc *guc, struct xe_exec_queue *q) if (job) { if ((xe_sched_job_started(job) && !xe_sched_job_completed(job)) || - xe_sched_invalidate_job(job, 2)) { + xe_sched_invalidate_job(job, 2)) trace_xe_sched_job_ban(job); - set_exec_queue_banned(q); - xe_sched_tdr_queue_imm(&q->guc->sched); - } + else + return; + } else if (!xe_exec_queue_is_lr(q) || + (xe_lrc_ring_head(q->lrc) == q->lrc->ring.tail)) { + return; } + set_exec_queue_banned(q); + xe_guc_exec_queue_trigger_cleanup(q); } } -- 2.25.1