Skip to content

drm/xe: Capture additional HW register state in devcoredump

Nareshkumar Gollakoti intel-xe 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest7 patches 3 repliesIn review
  2. v67 patches 3 repliesSuperseded
  3. v5 posting 2/27 patches 7 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v5 posting 1/27 patches2 repliesSuperseded
v47 patches1 replySuperseded
v37 patches2 repliesSuperseded
v27 patches0 repliesSuperseded
v16 patches0 repliesSuperseded

Changes in v7 from the cover letter

- Use a Xe_LP-specific L3 capture list to avoid unsupported L3_NODE_IDLE MCR reads while retaining L3STAT_LBCF_GFX capture
- Gate GAM page-fault capture on target-GT MCR coverage to avoid unsupported steered reads on Xe_LP
- Reordering of headers

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/xe/devcoredump: Capture GT fuse registers in devcoredumpdrivers/gpu/drm/xe/regs/xe_gt_regs.h drivers/gpu/drm/xe/xe_devcoredump.c drivers/gpu/drm/xe/xe_devcoredump_types.h+282 -10 replies
2/7drm/xe/devcoredump: Add GuC register snapshot to devcoredumpdrivers/gpu/drm/xe/regs/xe_guc_regs.h drivers/gpu/drm/xe/xe_devcoredump.c drivers/gpu/drm/xe/xe_devcoredump_types.h+45 -00 replies
3/7drm/xe/guc: Print register addresses in capture snapshot outputdrivers/gpu/drm/xe/xe_guc_capture.c+11 -50 replies
4/7drm/xe: dump GAM page fault report registers in devcoredumpdrivers/gpu/drm/xe/regs/xe_gt_regs.h drivers/gpu/drm/xe/xe_devcoredump.c drivers/gpu/drm/xe/xe_devcoredump_types.h+65 -40 replies
5/7drm/xe/guc: add TDL, SLICE gfx registers to capture listdrivers/gpu/drm/xe/regs/xe_gt_regs.h drivers/gpu/drm/xe/xe_guc_capture.c+9 -10 replies
6/7drm/xe: capture L3 node status registers in devcoredumpdrivers/gpu/drm/xe/regs/xe_gt_regs.h drivers/gpu/drm/xe/xe_devcoredump.c drivers/gpu/drm/xe/xe_devcoredump_types.h+39 -11 reply
7/7drm/xe/guc: capture additional engine state registersdrivers/gpu/drm/xe/regs/xe_engine_regs.h drivers/gpu/drm/xe/xe_guc_capture.c+87 -41 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchTejas Upadhyay
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/7] drm/xe: Capture additional HW register state in devcoredump

This series extends the Xe devcoredump with additional hardware register state to improve post-mortem debugging of GPU hangs and faults on Xe3p.

Today the devcoredump captures GuC log/CT, engine and submission state. When triaging hangs it is often necessary to also know the static HW configuration (fuses), GuC status/error state, GAM page-fault reporting and L3 node status at the time of the hang. Collecting these at capture time makes the dump self-contained and avoids relying on separate probe-time logging.

To do this, the series adds a small generic MMIO register-dump helper (descriptor list -> snapshot -> print/free) and uses it for several register groups. Each group is captured for both the primary GT and, where applicable, the media GT.
Registers requiring MCR steering are read through xe_gt_mcr_unicast_read_any(); the remaining GAM registers use INSTANCE0 default steering and are read directly.

Snapshots are allocated with GFP_ATOMIC as capture runs inside the dma_fence signalling section, matching the surrounding captures, and are freed in the existing devcoredump teardown path.

Patches:

  1  Add the generic reg-dump helpers and capture GT/media fuse registers.
  2  Capture GT and media GuC status/error registers.
  3  Print register offsets alongside names in the GuC engine capture
     output (32- and 64-bit), easing cross-reference with the bspec.
  4  Capture the GAM page-fault report head/tail registers.
  5  Add the TDL gfx registers to the XeHPG extended GuC capture list.
  6  Capture L3 node status registers (MCR, read via unicast_read_any()).
  7  Capture additional engine state registers

Sample devcoredump output gains the following sections:
**** GT Fuse Register Dump ****
**** Media GT Fuse Register Dump ****
**** GT GuC Register Dump ****
**** Media GT GuC Register Dump ****
**** GAM PF Report ****
**** Node Status ****
**** Additional engine state registers ****

v3:(Sashiko)
- Use the LOW_DW MMIO offset when printing combined 64-bit register values in capture snapshots
- Preserve the existing coredump register-name format and append register address as trailing metadata
- Replace the render is not awake message with raw POWERGATE_ENABLE bit-state output
- Move engine-class-specific registers out of COMMON_BASE_ENGINE_INSTANCE into class-specific capture lists

v4:
- optimized APIs and reduced few structs(Tejas)
- Fixed CI hook error

v5:
- Fixed Null derefence possibilities and ensured proper forcewake scope
- refactor struct member documentation(Tejas)

v6:
- Refactor regnames as per spec
- Add missing registers

v7:
- Use a Xe_LP-specific L3 capture list to avoid unsupported L3_NODE_IDLE MCR reads while retaining L3STAT_LBCF_GFX capture
- Gate GAM page-fault capture on target-GT MCR coverage to avoid unsupported steered reads on Xe_LP
- Reordering of headers

Nareshkumar Gollakoti (7):
drm/xe/devcoredump: Capture GT fuse registers in devcoredump drm/xe/devcoredump: Add GuC register snapshot to devcoredump drm/xe/guc: Print register addresses in capture snapshot output drm/xe: dump GAM page fault report registers in devcoredump drm/xe/guc: add TDL,SLICE gfx registers to capture list drm/xe: capture L3 node status registers in devcoredump drm/xe/guc: capture additional engine state registers

 drivers/gpu/drm/xe/regs/xe_engine_regs.h  |  24 ++
 drivers/gpu/drm/xe/regs/xe_gt_regs.h      |  13 +
 drivers/gpu/drm/xe/regs/xe_guc_regs.h     |   5 +
 drivers/gpu/drm/xe/xe_devcoredump.c       | 349 +++++++++++++++++++++-
 drivers/gpu/drm/xe/xe_devcoredump_types.h |  67 +++++
 drivers/gpu/drm/xe/xe_guc_capture.c       |  86 +++++-
 6 files changed, 533 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0