Add new debug infrastructure for configfs
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 3 repliesIn review
v2 from the cover letter
- In this second revision I did confirm that the guc_log_level module parameter is taking precedence over the configfs parameter and ensured the other parameters seem to be autogenerating and working as expected.
- I tried to address all the review feedback from the first revision, [2].
- I also did another pass on the sorting since there were a few discrepancies I noticed in the first revision. I kept Gustavo's R-B on that one, but would like an ack before merging at least to confirm the patch is sane.
- And finally I moved the getter functions into the X-macro generators so we can autogenerate more of the similar functions between the different parameters in that debug param list.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | drm/xe: Sort xe_config_device fieldsdrivers/ drivers/ | +562 | 0 replies | |
| 2/9 | drm/xe: Split out configfs data structuresdrivers/ drivers/ drivers/ | +54 | 0 replies | |
| 3/9 | drm/xe: Add a new debug focused configfs groupdrivers/ drivers/ drivers/ +2 more | +37 | 3 replies | |
| 4/9 | drm/xe: Move debug configfs entries to xe_configfs_debug.cdrivers/ drivers/ drivers/ +10 more | +1129 | 0 replies | |
| 5/9 | drm/xe/guc: Add configfs support for guc_log_leveldrivers/ drivers/ drivers/ +3 more | +97 | 0 replies | |
| 6/9 | drm/xe/guc: Add support for NPK as a GuC log targetdrivers/ drivers/ drivers/ +4 more | +88 | 0 replies | |
| 7/9 | drm/xe: Add infrastructure for debug configfs parametersdrivers/ drivers/ drivers/ | +325 | 0 replies | |
| 8/9 | drm/xe: Migrate existing debug configfs entries to params infrastructuredrivers/ drivers/ drivers/ +6 more | +47 | 0 replies | |
| 9/9 | drm/xe: Taint kernel when debug configfs parameters are setdrivers/ drivers/ | +18 | 0 replies |
Reviews trailers per patch
2 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Gustavo Sousa | Rodrigo Vivi |
|---|---|---|
| 1/9 | R-b | |
| 2/9 | ||
| 3/9 | R-b | |
| 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.
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 sorting the existing parameters by name/type. I 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. Took a bit of time getting back to this series around other work, and in that time I was playing around with a few different models, hence some of the patches are showing multiple of them. I tried to attribute each as I was implementing the changes.
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.
v2:
- In this second revision I did confirm that the guc_log_level module parameter is taking precedence over the configfs parameter and ensured the other parameters seem to be autogenerating and working as expected.
- I tried to address all the review feedback from the first revision, [2].
- I also did another pass on the sorting since there were a few discrepancies I noticed in the first revision. I kept Gustavo's R-B on that one, but would like an ack before merging at least to confirm the patch is sane.
- And finally I moved the getter functions into the X-macro generators so we can autogenerate more of the similar functions between the different parameters in that debug param list.
v3:
- Address a couple of comments from Sashiko around GuC log level input checking and proper guard implementation.
[1]: https://patchwork.freedesktop.org/series/162087/
[2]: https://patchwork.freedesktop.org/series/165879/
Stuart Summers (9):
drm/xe: Sort xe_config_device fields
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
drm/xe: Taint kernel when debug configfs parameters are set
drivers/gpu/drm/xe/Makefile | 2 + drivers/gpu/drm/xe/abi/guc_log_abi.h | 8 + drivers/gpu/drm/xe/xe_configfs.c | 1017 +---------------- drivers/gpu/drm/xe/xe_configfs.h | 90 +- drivers/gpu/drm/xe/xe_configfs_debug.c | 870 ++++++++++++++ drivers/gpu/drm/xe/xe_configfs_debug.h | 48 + drivers/gpu/drm/xe/xe_configfs_debug_params.c | 158 +++ drivers/gpu/drm/xe/xe_configfs_debug_params.h | 193 ++++ drivers/gpu/drm/xe/xe_configfs_types.h | 59 + drivers/gpu/drm/xe/xe_defaults.h | 5 + drivers/gpu/drm/xe/xe_guc.c | 14 +- drivers/gpu/drm/xe/xe_guc_ads.c | 1 + 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 | 3 +- drivers/gpu/drm/xe/xe_rtp.c | 3 +- drivers/gpu/drm/xe/xe_survivability_mode.c | 1 + 19 files changed, 1492 insertions(+), 986 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