Skip to content

Add new debug infrastructure for configfs

Stuart Summers intel-xe 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9drm/xe: Rename survivability_mode to enable_survivability_modedrivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs.h drivers/gpu/drm/xe/xe_survivability_mode.c+23 -226 replies
2/9drm/xe: Sort xe_config_device fields and defaults alphabeticallydrivers/gpu/drm/xe/xe_configfs.c+96 -964 replies
3/9drm/xe: Split out configfs data structuresdrivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs_types.h+80 -645 replies
4/9drm/xe: Add a new debug focused configfs groupdrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs_debug.c +2 more+35 -010 replies
5/9drm/xe: Move debug configfs entries to xe_configfs_debug.cdrivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs.h drivers/gpu/drm/xe/xe_configfs_debug.c +9 more+970 -8650 replies
6/9drm/xe/guc: Add configfs support for guc_log_leveldrivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs_debug.c drivers/gpu/drm/xe/xe_configfs_debug.h +3 more+98 -21 reply
7/9drm/xe/guc: Add support for NPK as a GuC log targetdrivers/gpu/drm/xe/abi/guc_log_abi.h drivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs_debug.c +4 more+89 -40 replies
8/9drm/xe: Add infrastructure for debug configfs parametersdrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs_debug.c +3 more+241 -10 replies
9/9drm/xe: Migrate existing debug configfs entries to params infrastructuredrivers/gpu/drm/xe/xe_configfs.c drivers/gpu/drm/xe/xe_configfs_debug.c drivers/gpu/drm/xe/xe_configfs_debug_params.h +1 more+21 -1420 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchGustavo Sousa
1/9
2/9R-b
3/9
4/9
5/9
6/9
7/9
8/9
9/9

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

Read the v1 thread

Cover letter [PATCH 0/9] Add new debug infrastructure for configfs

Add a new configfs debug group. The intent of this structure is to allow us to separate ABI facing configfs entries from those which are purely for debug purposes. And it allows us more flexibility in how we define those parameters used for debug.

Add a new infrastructure to this debug configfs group that lets us easily define the parameters in a quick list. This is primarily useful for simple, single-type parameters such as enable/disable features or simple values passed. For more complex parameters, we will still need to define these separately.

Pull the GuC target related changes from [1] to fit within this new structure and add a new definition for guc_log_level on top of the existing module parameter (to ensure we aren't impacting existing users of the module parameter).

Note that the debug parameters here are all to be used "at your own risk". Without having in depth knowledge of how these impact the software and hardware, there could be unforeseen consequences of setting them. As such, they are all wrapped in a CONFIG_DRM_XE_DEBUG configfs option.

In terms of the patches here, I'm also making a few organizational changes like naming and sorting. I also know we have a few other module parameters that could migrate here, but I didn't want to overload this series too much, so the focus for now is on the existing configfs entries and demonstrating the new structures with the GuC log level and target parameters.

I used GitHub Copilot with Claude pretty extensively through the process here and attributed as such. Happy to answer any questions around this.

I also decided to drop John Harrison from the NPK patch. It has been modified quite a bit from the original, but more importantly John is no longer with Intel and that email address isn't available any more. If it makes a difference here, John and I had both separately implemented this same change at different occasions for debug. The one I used to start that initial series was cherry-picked from his latest variant.

Tested on BMG.

[1] https://patchwork.freedesktop.org/series/162087/

Stuart Summers (9):
drm/xe: Rename survivability_mode to enable_survivability_mode drm/xe: Sort xe_config_device fields and defaults alphabetically drm/xe: Split out configfs data structures
drm/xe: Add a new debug focused configfs group drm/xe: Move debug configfs entries to xe_configfs_debug.c drm/xe/guc: Add configfs support for guc_log_level drm/xe/guc: Add support for NPK as a GuC log target drm/xe: Add infrastructure for debug configfs parameters drm/xe: Migrate existing debug configfs entries to params
infrastructure

 drivers/gpu/drm/xe/Makefile                   |   2 +
 drivers/gpu/drm/xe/abi/guc_log_abi.h          |   8 +
 drivers/gpu/drm/xe/xe_configfs.c              | 952 ++----------------
 drivers/gpu/drm/xe/xe_configfs.h              |  23 -
 drivers/gpu/drm/xe/xe_configfs_debug.c        | 900 +++++++++++++++++
 drivers/gpu/drm/xe/xe_configfs_debug.h        |  56 ++
 drivers/gpu/drm/xe/xe_configfs_debug_params.c | 112 +++
 drivers/gpu/drm/xe/xe_configfs_debug_params.h | 127 +++
 drivers/gpu/drm/xe/xe_configfs_types.h        |  73 ++
 drivers/gpu/drm/xe/xe_defaults.h              |   5 +
 drivers/gpu/drm/xe/xe_guc.c                   |  12 +-
 drivers/gpu/drm/xe/xe_guc_log.c               |   3 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   1 +
 drivers/gpu/drm/xe/xe_lrc.c                   |   1 +
 drivers/gpu/drm/xe/xe_pci.c                   |   1 +
 drivers/gpu/drm/xe/xe_psmi.c                  |   1 +
 drivers/gpu/drm/xe/xe_rtp.c                   |   1 +
 drivers/gpu/drm/xe/xe_survivability_mode.c    |   3 +-
 18 files changed, 1369 insertions(+), 912 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.c
 create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.h
 create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug_params.c
 create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug_params.h
 create mode 100644 drivers/gpu/drm/xe/xe_configfs_types.h
Signature · 1 line
2.43.0