All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/7] drm/xe: Add user commands to WA BB via configfs
@ 2025-09-16 21:15 Lucas De Marchi
  2025-09-16 21:15 ` [PATCH v5 1/7] drm/xe/configfs: Extract function to parse engine Lucas De Marchi
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Lucas De Marchi @ 2025-09-16 21:15 UTC (permalink / raw)
  To: intel-xe
  Cc: Lucas De Marchi, Stuart Summers, Matt Roper, Riana Tauro,
	Rodrigo Vivi, Umesh Nerlige Ramappa, Tvrtko Ursulin, Raag Jadav

Integrate WA BB (aka post context restore bb) with configfs to allow
validation to experiment with the GPU, executing commands on every
context switch.

Setting some registers to experiment:

	# echo 0 > /sys/bus/pci/drivers_autoprobe
	# modprobe xe
	# mkdir  /sys/kernel/config/xe/0000:03:00.0
	# cat > /sys/kernel/config/xe/0000\:03\:00.0/ctx_restore_post_bb  <<EOF
	bcs cmd 11000001 4F100 cafebabe
	vcs cmd 11000001 4F104 0FF1CE
	rcs cmd 11000001 4F108 BAADF00D
	EOF
	# echo 0000:03:00.0 > /sys/bus/pci/drivers/xe/bind
	# intel_reg read mmio:4F100 mmio:4f104 mmio:4f108
                                    (0x0004f100): 0xcafebabe
                                    (0x0004f104): 0x000ff1ce
                                    (0x0004f108): 0xbaadf00d

Same thing can be done with ctx_restore_mid_bb (as long as the register
is not overwritten during the engine restore phase). Which one to use
depends on the purpose of the debug.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
Changes in v5:
- First patches that were just tangentially related (and actual fixes)
  already applied
- Add new patches to support mid context restore (aka INDIRECT_CTX in
  the LRC)
- Link to v4: https://lore.kernel.org/r/20250911-wa-bb-cmds-v4-0-c8f7e48f7eae@intel.com

Changes in v4:
- Taint the kernel
- Link to v3: https://lore.kernel.org/r/20250905-wa-bb-cmds-v3-0-3da2b7bdc73e@intel.com

Changes in v3:
- Minor updates on first patches
- Fix kunit build (without CONFIG_CONFIGFS_FS)
- Fix use of binary attributes failing the expectation of a failed write
  producing an error code
- Link to v2: https://lore.kernel.org/r/20250827-wa-bb-cmds-v2-0-3cdf4d63c72a@intel.com

Changes in v2:
- Drop other refactors and fixes already merged
- Add documentation and make sure it works with intel_reg
- Refactor command parsing to be able to easily extend it for other BBs
  to be added in future.
- Link to v1: https://lore.kernel.org/r/20250523-wa-bb-cmds-v1-0-40b337f71bcd@intel.com
---
Lucas De Marchi (7):
      drm/xe/configfs: Extract function to parse engine
      drm/xe/configfs: Allow to select by class only
      drm/xe/lrc: Allow to add user commands on context switch
      drm/xe/configfs: Add post context restore bb
      drm/xe/lrc: Allow INDIRECT_CTX for more engine classes
      drm/xe/lrc: Allow to add user commands mid context switch
      drm/xe/configfs: Add mid context restore bb

 drivers/gpu/drm/xe/regs/xe_lrc_layout.h |   3 -
 drivers/gpu/drm/xe/xe_configfs.c        | 418 ++++++++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_configfs.h        |  10 +
 drivers/gpu/drm/xe/xe_lrc.c             |  83 ++++++-
 4 files changed, 484 insertions(+), 30 deletions(-)

base-commit: c3610fc0ab7c1c668031b3804549187d75550e93
change-id: 20250523-wa-bb-cmds-2a81a7121fc2

Lucas De Marchi


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-09-26 14:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 21:15 [PATCH v5 0/7] drm/xe: Add user commands to WA BB via configfs Lucas De Marchi
2025-09-16 21:15 ` [PATCH v5 1/7] drm/xe/configfs: Extract function to parse engine Lucas De Marchi
2025-09-16 21:15 ` [PATCH v5 2/7] drm/xe/configfs: Allow to select by class only Lucas De Marchi
2025-09-16 21:15 ` [PATCH v5 3/7] drm/xe/lrc: Allow to add user commands on context switch Lucas De Marchi
2025-09-17 16:32   ` Rodrigo Vivi
2025-09-16 21:15 ` [PATCH v5 4/7] drm/xe/configfs: Add post context restore bb Lucas De Marchi
2025-09-24 20:31   ` Kees Bakker
2025-09-24 21:34     ` Lucas De Marchi
2025-09-16 21:15 ` [PATCH v5 5/7] drm/xe/lrc: Allow INDIRECT_CTX for more engine classes Lucas De Marchi
2025-09-17 19:52   ` Rodrigo Vivi
2025-09-16 21:15 ` [PATCH v5 6/7] drm/xe/lrc: Allow to add user commands mid context switch Lucas De Marchi
2025-09-17 19:53   ` Rodrigo Vivi
2025-09-16 21:15 ` [PATCH v5 7/7] drm/xe/configfs: Add mid context restore bb Lucas De Marchi
2025-09-17 19:53   ` Rodrigo Vivi
2025-09-16 21:21 ` ✗ CI.checkpatch: warning for drm/xe: Add user commands to WA BB via configfs Patchwork
2025-09-16 21:23 ` ✓ CI.KUnit: success " Patchwork
2025-09-16 21:58 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-17  1:22 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-17  6:44 ` [PATCH v5 0/7] " Raag Jadav
2025-09-18 21:47 ` Lucas De Marchi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.