diff mbox series

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

Message ID 20241018205519.86326-2-zhanjun.dong@intel.com (mailing list archive)
State New, archived
Headers show
Series FOR-CI: drm/i915/guc: Disable ct during GuC reset | expand

Commit Message

Dong, Zhanjun Oct. 18, 2024, 8:55 p.m. UTC
During GuC reset prepare, interrupt disabled before hardware reset.
Add disable ct to prevent unnecessary message processing.

Signed-off-by: Zhanjun Dong <zhanjun.dong@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 mbox series

Patch

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);