Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zhanjun Dong <zhanjun.dong@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Zhanjun Dong <zhanjun.dong@intel.com>
Subject: [PATCH v9 0/7] Attempt to fixup reset, wedge, unload corner cases
Date: Tue, 10 Mar 2026 18:50:32 -0400	[thread overview]
Message-ID: <20260310225039.1320161-1-zhanjun.dong@intel.com> (raw)

We have several bug reports [1], [2], [3] describing failures in reset,
wedge, and unload corner cases where memory is not properly freed or
fences fail to signal. This patch attempts to address the issue by
forcefully killing any remaining queues on driver unload and wedging the
device if not in mode 2.

Zhanjun Dong

[1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5466
[2] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5530
[3] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6029

---
History started from v2 (v1 not found):
v9:
 - Limit 1 author per patch to avoid confusion in git bisect
v8:
 - Bug fix for Assertion `xe_guc_read_stopped(guc) == 1` failed
 - Add kernel-doc (Michal)
 - Rename function __xe_guc_submit_reset_prepare (Michal)
 - Remove empty errout: block, change goto to return (Michal)
v7:
 - Add "Open-code GGTT MMIO access protection" and rebase with baseline changes
v6:
 - Split guc_submit_fini into 2 parts, device related by devm and software
   only part by drmm
v5:
 - Removed redundant xe_guc_ct_stop() and __xe_guc_submit_reset_prepare()
   calls (Michal and Matthew)
 - Split patch 3 into 2 patches(new #3 and #4), #3 is for fixes old patch purpose,
   #4 add as separate commit uses the enum for better code maintainability (Matthew)
v4:
 - Make guc_submit_fini a devm managed action
 - Squash patch 2 with 6 from v3
 - Commit message update (Matthew)
v3:
 - Add patch 3-6 in series
 - For "Trigger queue cleanup if not in wedged mode 2":
     Add guc_ct_stop and reset prepare in patch of:
     Sync with baseline changes

Matthew Brost (2):
  drm/xe: Always kill exec queues in xe_guc_submit_pause_abort
  drm/xe: Open-code GGTT MMIO access protection

Zhanjun Dong (5):
  drm/xe: Forcefully tear down exec queues in GuC submit fini
  drm/xe: Trigger queue cleanup if not in wedged mode 2
  drm/xe: Use XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET enum instead of
    magic number
  drm/xe/guc: Ensure CT state transitions via STOP before DISABLED
  drm/xe/uc: Drop xe_guc_sanitize in favor of managed cleanup

 drivers/gpu/drm/xe/xe_ggtt.c       | 15 +++---
 drivers/gpu/drm/xe/xe_guc.c        | 26 ++++++++-
 drivers/gpu/drm/xe/xe_guc.h        |  1 +
 drivers/gpu/drm/xe/xe_guc_ct.c     |  1 +
 drivers/gpu/drm/xe/xe_guc_submit.c | 87 +++++++++++++++++++++---------
 drivers/gpu/drm/xe/xe_uc.c         | 22 +++-----
 6 files changed, 104 insertions(+), 48 deletions(-)

-- 
2.34.1


             reply	other threads:[~2026-03-10 22:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 22:50 Zhanjun Dong [this message]
2026-03-10 22:50 ` [PATCH v9 1/7] drm/xe: Always kill exec queues in xe_guc_submit_pause_abort Zhanjun Dong
2026-03-10 22:50 ` [PATCH v9 2/7] drm/xe: Forcefully tear down exec queues in GuC submit fini Zhanjun Dong
2026-03-11 16:34   ` Dong, Zhanjun
2026-03-13 18:48     ` Matthew Brost
2026-03-13 20:30       ` Dong, Zhanjun
2026-03-10 22:50 ` [PATCH v9 3/7] drm/xe: Trigger queue cleanup if not in wedged mode 2 Zhanjun Dong
2026-03-11 16:33   ` Dong, Zhanjun
2026-03-13 18:49     ` Matthew Brost
2026-03-13 20:31       ` Dong, Zhanjun
2026-03-10 22:50 ` [PATCH v9 4/7] drm/xe: Use XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET enum instead of magic number Zhanjun Dong
2026-03-10 22:50 ` [PATCH v9 5/7] drm/xe/guc: Ensure CT state transitions via STOP before DISABLED Zhanjun Dong
2026-03-10 22:50 ` [PATCH v9 6/7] drm/xe/uc: Drop xe_guc_sanitize in favor of managed cleanup Zhanjun Dong
2026-03-13 22:53   ` Matthew Brost
2026-03-10 22:50 ` [PATCH v9 7/7] drm/xe: Open-code GGTT MMIO access protection Zhanjun Dong
2026-03-10 22:56 ` ✗ CI.checkpatch: warning for Attempt to fixup reset, wedge, unload corner cases Patchwork
2026-03-10 22:58 ` ✓ CI.KUnit: success " Patchwork
2026-03-10 23:41 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-11 16:20 ` ✗ Xe.CI.FULL: failure " 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=20260310225039.1320161-1-zhanjun.dong@intel.com \
    --to=zhanjun.dong@intel.com \
    --cc=intel-xe@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