Skip to content

drm/xe/sysctrl: Add System Controller debugfs

Anoop, Vijay intel-xe 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 1 replyIn review
  2. v73 patches 4 repliesSuperseded
  3. v63 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v53 patches2 repliesSuperseded
v44 patches4 repliesSuperseded
v34 patches8 repliesSuperseded
v22 patches3 repliesSuperseded
v1 RFC5 patches4 repliesSuperseded

Changes in v8 from the cover letter

- Tighten debugfs permissions to 0600
- Fix multi-space mailbox token parsing
- Tighten mailbox response-length validation

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/xe/sysctrl: Add sysctrl debugfs infrastructure and loopback test interfacedrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_debugfs.c drivers/gpu/drm/xe/xe_sysctrl_debugfs.c +3 more+238 -00 replies
2/3drm/xe/sysctrl: Add RAS error injection debugfs interfacedrivers/gpu/drm/xe/xe_sysctrl_debugfs.c drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h drivers/gpu/drm/xe/xe_sysctrl_types.h+186 -00 replies
3/3drm/xe/sysctrl: Add generic mailbox passthrough debugfs entrydrivers/gpu/drm/xe/xe_sysctrl_debugfs.c drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h drivers/gpu/drm/xe/xe_sysctrl_types.h+179 -01 reply

Reviews trailers per patch

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

PatchRodrigo Vivi
1/3R-b
2/3R-b
3/3R-b

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

Read the v8 thread

Cover letter [PATCH v8 0/3] drm/xe/sysctrl: Add System Controller debugfs

From: Anoop Vijay <[email protected]>

This series adds debugfs-based test interfaces for the System Controller (sysctrl) mailbox, to aid validation of firmware communication and RAS error handling without requiring userspace tooling.

Key features introduced:
- Debugfs infrastructure for sysctrl (types, registration hook)
- Loopback test entry exercising the mailbox send/receive path via the Core group's inverted loopback command (0xFF/0x03)
- RAS error injection entry exercising the Diag group's RAS_ERR_INJECT command (0x02/0x7E), gated on the diag application having completed firmware boot/init
- Generic mailbox passthrough entry for any group/command not covered by a dedicated entry

v8 (Rodrigo, Sashiko AI):
- Tighten debugfs permissions to 0600
- Fix multi-space mailbox token parsing
- Tighten mailbox response-length validation

v7:
- Add per-command timeout override to mailbox debugfs
- Add per-command response-length override to mailbox debugfs
- Add usage hint to loopback debugfs output
- Default mailbox response capacity to XE_SYSCTRL_MB_MAX_DATA_SIZE (accounting for the mailbox header size) instead of XE_SYSCTRL_MB_MAX_MESSAGE_SIZE
- Reject resplen=0 and skip empty tokens after timeout= so a resplen= separated by multiple spaces is still recognized (Sashiko AI)

v6 (Rodrigo):
- Reject non-zero offset writes for loopback, mailbox, and ras_error_inject entries
- Account for mailbox header size when validating input payload length
- Add warning on devm_mutex_init() registration failures
- Refactor token parsing to simplify cleanup and error handling

v5:
- Drop the application-status patch; already landed upstream
- Add per-entry locking for debugfs accesses
- Add xe_pm_runtime guards for ras_error_inject readiness checks
- Simplify ras_error_inject write-path flow
- Skip empty mailbox group/command tokens
- Drop unused xe_device.h include

v4 (Rodrigo, Anshuman):
- Added lore links to the parent application-status series
- Squashed debugfs infrastructure and loopback support into a single commit
- Gated ras_error_inject on diag firmware readiness in .open()
- Added a generic mailbox debugfs entry

v3:
- Fix RAS error injection command ID to 0x7E
- Add xe_pm_runtime guard for mailbox commands
- Rename error injection command to avoid fwctl command ID collision
- Reject writes until the diag firmware is ready

Anoop Vijay (3):
drm/xe/sysctrl: Add sysctrl debugfs infrastructure and loopback test
interface
drm/xe/sysctrl: Add RAS error injection debugfs interface drm/xe/sysctrl: Add generic mailbox passthrough debugfs entry

 drivers/gpu/drm/xe/Makefile                   |   1 +
 drivers/gpu/drm/xe/xe_debugfs.c               |   4 +
 drivers/gpu/drm/xe/xe_sysctrl_debugfs.c       | 500 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_sysctrl_debugfs.h       |  14 +
 drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h |  37 ++
 drivers/gpu/drm/xe/xe_sysctrl_types.h         |  47 ++
 6 files changed, 603 insertions(+)
 create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_debugfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_debugfs.h
Signature · 1 line
2.43.0