Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zhanjun Dong <zhanjun.dong@intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Zhanjun Dong <zhanjun.dong@intel.com>
Subject: [PATCH v2 1/1] drm/i915/guc: Move destroy context at end of reset prepare
Date: Mon, 21 Oct 2024 15:43:16 -0700	[thread overview]
Message-ID: <20241021224316.293590-2-zhanjun.dong@intel.com> (raw)
In-Reply-To: <20241021224316.293590-1-zhanjun.dong@intel.com>

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 --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 *
-- 
2.34.1


  reply	other threads:[~2024-10-21 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 22:43 [PATCH v2 0/1] FOR-CI: drm/i915/guc: Move destroy context at end of reset prepare Zhanjun Dong
2024-10-21 22:43 ` Zhanjun Dong [this message]
2024-10-22  0:05 ` ✗ Fi.CI.BAT: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241021224316.293590-2-zhanjun.dong@intel.com \
    --to=zhanjun.dong@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox