From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66941375259; Sat, 28 Feb 2026 17:35:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300153; cv=none; b=T0mAgBuRvS24ist+txmRogn0js0bmJTv3SqrS2usc39mufgr5DqpVM420DLvPCAD6RkRHycIpHpgGBgECbi7rUFdy0kB1dSqHOPpA1zX4cK8QqH1R1fR19FLZwNuwUy9nwun2jHdeHbBjpcYfhjKJWVhE8y6QyU4wmQ+8kMmwq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300153; c=relaxed/simple; bh=fXAX9LhA9WCCjvD4wbLPx91gxh6pb3yQ+Cj2hu0fIwQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S2s7OX7MYiznmkzvEOvxX7srtncCjMEiRhewdAbHgwLLno7OwQ25QZxhVGAorKy7GLvK0X2V6h1yyYqX54pK16Lm3E0e9F+smGyHzWWOXguV44GwVVPVcAonUWGrGN5JxGcuBAurxO7ZnfT1g9gQ6zRvJ3maC4r52lYDr87K7aQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YPEQx86Q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YPEQx86Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 876CBC116D0; Sat, 28 Feb 2026 17:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300153; bh=fXAX9LhA9WCCjvD4wbLPx91gxh6pb3yQ+Cj2hu0fIwQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YPEQx86QI+9uKU+IftChaMMk5/JmkRw1IN/VQYWUe00Vz6OZGDFKZeKYDtAZRAmxU A4m0SeYa6LGLTpI46VAGCoch+d9D5LoqkIbsHQFWnR9NDbA7lowJa2E0s2uVcxQwcx VDu3wDyvwYIoGYKUn218jOypGscTftYgHZJZVjF6P1/Z3v3WhJ5fTCEvIl5KuSv9gr jpPwUd1+FeWR0ujhEQzqZNN1Ur41Ab0vXYtBw2NS0BpcZ9/qvC62KwM5IWtyVhyiMR QaAnWjAWwkYgLOtgdjAckNbStUrH3BWTzFTnqsXEykI+vRlZhRbt9p5JXH2GAtAllA kRrEo1tW+Klsw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Matthew Brost , Niranjana Vishwanathapura , Sasha Levin Subject: [PATCH 6.19 171/844] drm/xe: Only toggle scheduling in TDR if GuC is running Date: Sat, 28 Feb 2026 12:21:24 -0500 Message-ID: <20260228173244.1509663-172-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Matthew Brost [ Upstream commit dd1ef5e2456558876244795bb22a4d90cb24f160 ] If the firmware is not running during TDR (e.g., when the driver is unloading), there's no need to toggle scheduling in the GuC. In such cases, skip this step. v4: - Bail on wait UC not running (Niranjana) Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Link: https://patch.msgid.link/20260110012739.2888434-4-matthew.brost@intel.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/xe/xe_guc_submit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index f6ba2b0f074d2..ced13f17fb720 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -1304,7 +1304,7 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job) if (exec_queue_reset(q)) err = -EIO; - if (!exec_queue_destroyed(q)) { + if (!exec_queue_destroyed(q) && xe_uc_fw_is_running(&guc->fw)) { /* * Wait for any pending G2H to flush out before * modifying state @@ -1339,6 +1339,7 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job) */ smp_rmb(); ret = wait_event_timeout(guc->ct.wq, + !xe_uc_fw_is_running(&guc->fw) || !exec_queue_pending_disable(q) || xe_guc_read_stopped(guc) || vf_recovery(guc), HZ * 5); -- 2.51.0