diff mbox series

[v2,1/1] drm/i915/guc: Move destroy context at end of reset prepare

Message ID 20241021224316.293590-2-zhanjun.dong@intel.com (mailing list archive)
State New
Headers show
Series FOR-CI: drm/i915/guc: Move destroy context at end of reset prepare | expand

Commit Message

Zhanjun Dong Oct. 21, 2024, 10:43 p.m. UTC
During GuC reset prepare, interrupt disabled before hardware reset,
although interrupt disabled, the ct is still enabled, the host-GuC
communication is still active.
Move the destroy part to the end of reset preparation to avoid the
situation of host processing G2H messages about an context, but the
context already been destroyed.

Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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..858756eb4eb9 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1689,10 +1689,11 @@  void intel_guc_submission_reset_prepare(struct intel_guc *guc)
 	spin_unlock_irq(guc_to_gt(guc)->irq_lock);
 
 	guc_flush_submissions(guc);
-	guc_flush_destroyed_contexts(guc);
 	flush_work(&guc->ct.requests.worker);
 
 	scrub_guc_desc_for_outstanding_g2h(guc);
+	guc_flush_destroyed_contexts(guc);
+
 }
 
 static struct intel_engine_cs *