Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Attempt to fixup reset, wedge, unload corner cases
@ 2026-01-27 17:04 Zhanjun Dong
  2026-01-27 17:04 ` [PATCH v4 1/5] drm/xe: Always kill exec queues in xe_guc_submit_pause_abort Zhanjun Dong
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Zhanjun Dong @ 2026-01-27 17:04 UTC (permalink / raw)
  To: intel-xe; +Cc: Zhanjun Dong

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):
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 (3):
  drm/xe: Always kill exec queues in xe_guc_submit_pause_abort
  drm/xe: Forcefully tear down exec queues in GuC submit fini
  drm/xe: Trigger queue cleanup if not in wedged mode 2

Zhanjun Dong (2):
  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_guc_ct.c     |  1 +
 drivers/gpu/drm/xe/xe_guc_submit.c | 68 +++++++++++++++++++-----------
 drivers/gpu/drm/xe/xe_uc.c         |  2 -
 3 files changed, 45 insertions(+), 26 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v9 0/7] Attempt to fixup reset, wedge, unload corner cases
@ 2026-03-10 22:50 Zhanjun Dong
  2026-03-11 16:20 ` ✗ Xe.CI.FULL: failure for " Patchwork
  0 siblings, 1 reply; 19+ messages in thread
From: Zhanjun Dong @ 2026-03-10 22:50 UTC (permalink / raw)
  To: intel-xe; +Cc: Zhanjun Dong

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


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v7 0/7] Attempt to fixup reset, wedge, unload corner cases
@ 2026-02-19 18:06 Zhanjun Dong
  2026-02-20 12:59 ` ✗ Xe.CI.FULL: failure for " Patchwork
  0 siblings, 1 reply; 19+ messages in thread
From: Zhanjun Dong @ 2026-02-19 18:06 UTC (permalink / raw)
  To: intel-xe; +Cc: Wajdeczko, Michal, Zhanjun Dong

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):
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        | 18 ++++++-
 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 | 86 +++++++++++++++++++++---------
 drivers/gpu/drm/xe/xe_uc.c         |  2 -
 6 files changed, 88 insertions(+), 35 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v6 0/6] Attempt to fixup reset, wedge, unload corner cases
@ 2026-02-11 22:20 Zhanjun Dong
  2026-02-13  5:44 ` ✗ Xe.CI.FULL: failure for " Patchwork
  0 siblings, 1 reply; 19+ messages in thread
From: Zhanjun Dong @ 2026-02-11 22:20 UTC (permalink / raw)
  To: intel-xe; +Cc: Zhanjun Dong

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):
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 (1):
  drm/xe: Always kill exec queues in xe_guc_submit_pause_abort

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_guc.c        | 18 ++++++-
 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 | 86 +++++++++++++++++++++---------
 drivers/gpu/drm/xe/xe_uc.c         |  2 -
 5 files changed, 79 insertions(+), 29 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v3 0/6] Attempt to fixup reset, wedge, unload corner cases
@ 2026-01-20 20:16 Zhanjun Dong
  2026-01-21  3:20 ` ✗ Xe.CI.Full: failure for " Patchwork
  0 siblings, 1 reply; 19+ messages in thread
From: Zhanjun Dong @ 2026-01-20 20:16 UTC (permalink / raw)
  To: intel-xe; +Cc: Zhanjun Dong

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):
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 (3):
  drm/xe: Always kill exec queues in xe_guc_submit_pause_abort
  drm/xe: Forcefully tear down exec queues in GuC submit fini
  drm/xe: Trigger queue cleanup if not in wedged mode 2

Zhanjun Dong (3):
  drm/xe/guc: Ensure CT state transitions via STOP before DISABLED
  drm/xe/uc: Drop xe_guc_sanitize in favor of managed cleanup
  drm/xe/guc: Fix page fault by moving guc_submit_fini to devm

 drivers/gpu/drm/xe/xe_guc_ct.c     |  1 +
 drivers/gpu/drm/xe/xe_guc_submit.c | 68 +++++++++++++++++++-----------
 drivers/gpu/drm/xe/xe_uc.c         |  2 -
 3 files changed, 45 insertions(+), 26 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v2 0/3] Attempt to fixup reset, wedge, unload corner cases
@ 2025-12-18 21:44 Matthew Brost
  2025-12-20  1:22 ` ✗ Xe.CI.Full: failure for " Patchwork
  0 siblings, 1 reply; 19+ messages in thread
From: Matthew Brost @ 2025-12-18 21:44 UTC (permalink / raw)
  To: intel-xe

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.

Matt 

[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

Matthew Brost (3):
  drm/xe: Always kill exec queues in xe_guc_submit_pause_abort
  drm/xe: Forcefully tear down exec queues in GuC submit fini
  drm/xe: Trigger queue cleanup if not in wedged mode 2

 drivers/gpu/drm/xe/xe_guc_submit.c | 61 ++++++++++++++++++++----------
 1 file changed, 40 insertions(+), 21 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [RFC PATCH 0/3] Attempt to fixup reset, wedge, unload corner cases
@ 2025-12-12 23:34 Matthew Brost
  2025-12-13 22:08 ` ✗ Xe.CI.Full: failure for " Patchwork
  0 siblings, 1 reply; 19+ messages in thread
From: Matthew Brost @ 2025-12-12 23:34 UTC (permalink / raw)
  To: intel-xe

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.

Sending as RFC for now, as I don’t have sufficient coverage to test and
ensure everything works correctly.

Matt 

[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

Matthew Brost (3):
  drm/xe: Always kill exec queues in xe_guc_submit_pause_abort
  drm/xe: Forcefully tear down exec queues in GuC submit fini
  drm/xe: Trigger queue cleanup if not in wedged mode 2

 drivers/gpu/drm/xe/xe_guc_submit.c | 40 +++++++++++++++++++-----------
 1 file changed, 26 insertions(+), 14 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-03-11 16:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 17:04 [PATCH v4 0/5] Attempt to fixup reset, wedge, unload corner cases Zhanjun Dong
2026-01-27 17:04 ` [PATCH v4 1/5] drm/xe: Always kill exec queues in xe_guc_submit_pause_abort Zhanjun Dong
2026-01-27 17:04 ` [PATCH v4 2/5] drm/xe: Forcefully tear down exec queues in GuC submit fini Zhanjun Dong
2026-01-27 17:04 ` [PATCH v4 3/5] drm/xe: Trigger queue cleanup if not in wedged mode 2 Zhanjun Dong
2026-01-27 22:02   ` Michal Wajdeczko
2026-01-28  3:39     ` Matthew Brost
2026-01-28 21:55       ` Dong, Zhanjun
2026-01-27 17:04 ` [PATCH v4 4/5] drm/xe/guc: Ensure CT state transitions via STOP before DISABLED Zhanjun Dong
2026-01-27 17:04 ` [PATCH v4 5/5] drm/xe/uc: Drop xe_guc_sanitize in favor of managed cleanup Zhanjun Dong
2026-01-27 17:12 ` ✓ CI.KUnit: success for Attempt to fixup reset, wedge, unload corner cases Patchwork
2026-01-27 18:08 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-27 22:26 ` ✗ Xe.CI.Full: failure " Patchwork
2026-01-28  3:24   ` Matthew Brost
  -- strict thread matches above, loose matches on Subject: below --
2026-03-10 22:50 [PATCH v9 0/7] " Zhanjun Dong
2026-03-11 16:20 ` ✗ Xe.CI.FULL: failure for " Patchwork
2026-02-19 18:06 [PATCH v7 0/7] " Zhanjun Dong
2026-02-20 12:59 ` ✗ Xe.CI.FULL: failure for " Patchwork
2026-02-11 22:20 [PATCH v6 0/6] " Zhanjun Dong
2026-02-13  5:44 ` ✗ Xe.CI.FULL: failure for " Patchwork
2026-01-20 20:16 [PATCH v3 0/6] " Zhanjun Dong
2026-01-21  3:20 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-12-18 21:44 [PATCH v2 0/3] " Matthew Brost
2025-12-20  1:22 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-12-12 23:34 [RFC PATCH 0/3] " Matthew Brost
2025-12-13 22:08 ` ✗ Xe.CI.Full: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox