Add debugfs facility to catch RTP mistakes
Get series with b4
b4 am [email protected] change-id 20260218-sr_verify-78b230b10acfVersions newest first · linked by author and title
- v4 Latest4 patches 4 repliesIn review
- v34 patches 2 repliesSuperseded
- v24 patches 0 repliesSuperseded
Changes in v4 from the cover letter
- Add an extra parameter to xe_rtp_process_to_sr() to determine whether the RTP -> sr processing should be performed for SR-IOV VF devices or not, rather than adding the VF conditional checks to the callsites. (Ashutosh)
- Fix a missing parameter to kerneldoc for xe_reg_sr_lrc_check.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | drm/xe/reg_sr: Don't process gt/hwe lists in VFdrivers/ drivers/ drivers/ +5 more | +34 | 1 reply | |
| 2/4 | drm/xe/reg_sr: Add debugfs to verify status of reg_sr programmingdrivers/ drivers/ drivers/ | +63 | 0 replies | |
| 3/4 | drm/xe: Add facility to lookup the value of a register in a default LRCdrivers/ drivers/ | +100 | 1 reply | |
| 4/4 | drm/xe/reg_sr: Allow register_save_restore_check debugfs to verify LRC valuesdrivers/ drivers/ drivers/ | +36 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Ashutosh Dixit |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/4] Add debugfs facility to catch RTP mistakes
Unlike i915, Xe doesn't currently do any readback verification of workaround/tuning settings that it tries to program. If an entry gets placed on the wrong table, or applied to the wrong platform/IP, the programming may be silently ineffective without anyone noticing.
i915's solution of doing verification at application time was problematic because raising warnings during probe would be treated by CI as a fatal problem and would prevent CI from even attempting any other testing until the issue was dealt with. Let's avoid that with Xe and instead perform the verification on-demand when a debugfs entry is read. This makes it very easy to do verification at various times during manual debugging. It should also be simply to wrap a dedicated IGT test around the debugfs entry such that any unexpected failures are reported against that one test rather than bringing down the entire CI system.
Note that verification of LRC programming is a bit more complicated than verification of GT/engine programming since we can't just blindly read the register values from the CPU and expect the RTP values to be in effect. Applying LRC programming ensures that every GPU context created should have the updated values in the LRC, and those values will get loaded into the register when the hardware context switches to it. However when no context is running on the hardware, the register values may revert to their hardware defaults which do not have the programming applied. Instead, we should verify LRC programming by parsing the engine's 'default LRC' image and making sure the desired programming appears somewhere in one of the MI_LOAD_REGISTER_IMM state emission commands.
v2:
- Avoid processing RTP -> SR for gt/hwe lists in VF to ensure the debugfs entry is safe to use in an SR-IOV VF. (Ashutosh)
- Add verification of LRC adjustments by searching engine type's default LRC.
v3:
- Add missing checks to avoid SR-IOV VF processing of RTP -> SR in hw_engine_setup_default_state() and xe_reg_whitelist_process_engine().
v4:
- Add an extra parameter to xe_rtp_process_to_sr() to determine whether the RTP -> sr processing should be performed for SR-IOV VF devices or not, rather than adding the VF conditional checks to the callsites. (Ashutosh)
- Fix a missing parameter to kerneldoc for xe_reg_sr_lrc_check.
Matt Roper (4):
drm/xe/reg_sr: Don't process gt/hwe lists in VF drm/xe/reg_sr: Add debugfs to verify status of reg_sr programming drm/xe: Add facility to lookup the value of a register in a default
LRC
drm/xe/reg_sr: Allow register_save_restore_check debugfs to verify LRC
values
drivers/gpu/drm/xe/xe_gt_debugfs.c | 26 ++++++++ drivers/gpu/drm/xe/xe_hw_engine.c | 3 + drivers/gpu/drm/xe/xe_lrc.c | 96 +++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_lrc.h | 4 ++ drivers/gpu/drm/xe/xe_reg_sr.c | 71 +++++++++++++++++++- drivers/gpu/drm/xe/xe_reg_sr.h | 7 ++ drivers/gpu/drm/xe/xe_reg_whitelist.c | 3 + drivers/gpu/drm/xe/xe_tuning.c | 7 ++ drivers/gpu/drm/xe/xe_wa.c | 6 ++ 9 files changed, 221 insertions(+), 2 deletions(-)
--
2.53.0
---
Matt Roper (4):
drm/xe/reg_sr: Don't process gt/hwe lists in VF
drm/xe/reg_sr: Add debugfs to verify status of reg_sr programming drm/xe: Add facility to lookup the value of a register in a default LRC drm/xe/reg_sr: Allow register_save_restore_check debugfs to verify LRC values
drivers/gpu/drm/xe/tests/xe_rtp_test.c | 3 +- drivers/gpu/drm/xe/xe_gt_debugfs.c | 26 +++++++++ drivers/gpu/drm/xe/xe_hw_engine.c | 6 ++- drivers/gpu/drm/xe/xe_lrc.c | 96 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_lrc.h | 4 ++ drivers/gpu/drm/xe/xe_reg_sr.c | 72 ++++++++++++++++++++++++- drivers/gpu/drm/xe/xe_reg_sr.h | 7 +++ drivers/gpu/drm/xe/xe_reg_whitelist.c | 2 +- drivers/gpu/drm/xe/xe_rtp.c | 8 ++- drivers/gpu/drm/xe/xe_rtp.h | 3 +- drivers/gpu/drm/xe/xe_tuning.c | 9 ++-- drivers/gpu/drm/xe/xe_wa.c | 9 ++-- 12 files changed, 231 insertions(+), 14 deletions(-)
---
base-commit: 7ee0795cb4f30c9ccc2b8a580faebcefbdf150c5
change-id: 20260218-sr_verify-78b230b10acf
Best regards,
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation