[PATCH v1 1/1] drm/i915/guc: Disable ct during GuC reset

Zhanjun Dong zhanjun.dong at intel.com
Fri Oct 18 20:55:19 UTC 2024


During GuC reset prepare, interrupt disabled before hardware reset.
Add disable ct to prevent unnecessary message processing.

Signed-off-by: Zhanjun Dong <zhanjun.dong at intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c         | 3 +++
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index 0d5197c0824a..7fd4f8f9131a 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -1176,6 +1176,9 @@ static bool ct_process_incoming_requests(struct intel_guc_ct *ct)
 	bool done;
 	int err;
 
+	if (!ct->enabled)
+		return true;
+
 	spin_lock_irqsave(&ct->requests.lock, flags);
 	request = list_first_entry_or_null(&ct->requests.incoming,
 					   struct ct_incoming_msg, link);
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 9ede6f240d79..866b71a87630 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1684,6 +1684,8 @@ void intel_guc_submission_reset_prepare(struct intel_guc *guc)
 	guc->interrupts.disable(guc);
 	__reset_guc_busyness_stats(guc);
 
+	intel_guc_ct_disable(&guc->ct);
+
 	/* Flush IRQ handler */
 	spin_lock_irq(guc_to_gt(guc)->irq_lock);
 	spin_unlock_irq(guc_to_gt(guc)->irq_lock);
-- 
2.34.1



More information about the Intel-gfx mailing list