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

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:04:00.0
	# echo '
	rcs cmd 11000001 4F104 DEADDEAD
	rcs reg 4F100 DEADBEEF
	' > /sys/kernel/config/xe/0000\:03\:00.0/ctx_restore_post_bb
	# echo 0000:04:00.0 > /sys/bus/pci/drivers/xe/bind

Testing it worked with intel_reg:

	# intel_reg read mmio:4F100
	(0x0004f100): 0xdeadbeef
	# intel_reg read mmio:4F104
	(0x0004f104): 0xdeaddead

This also prepares the codebase to use the same functions for mid
context restore.

Signed-off-by: Lucas De Marchi <lucas.demarchi@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 (6):
      drm/xe/configfs: Extract function to parse engine
      drm/xe/configfs: Allow to select by class only
      drm/xe: Update workaround documentation
      drm/xe/configfs: Fix documentation warning
      drm/xe/lrc: Allow to add user commands on context switch
      drm/xe/configfs: Add post context restore bb

 drivers/gpu/drm/xe/xe_configfs.c | 367 ++++++++++++++++++++++++++++++++++++---
 drivers/gpu/drm/xe/xe_configfs.h |   6 +
 drivers/gpu/drm/xe/xe_lrc.c      |  25 +++
 drivers/gpu/drm/xe/xe_wa.c       |  45 +++--
 4 files changed, 406 insertions(+), 37 deletions(-)

base-commit: 6e22fa06326d0e47e6344ddf35b9d78bd5d00101
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-03 22:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 22:35 [PATCH v2 0/6] drm/xe: Add user commands to WA BB via configfs Lucas De Marchi
2025-08-27 22:35 ` [PATCH v2 1/6] drm/xe/configfs: Extract function to parse engine Lucas De Marchi
2025-09-02  5:57   ` Raag Jadav
2025-08-27 22:35 ` [PATCH v2 2/6] drm/xe/configfs: Allow to select by class only Lucas De Marchi
2025-09-02  6:00   ` Raag Jadav
2025-09-03 22:42     ` Lucas De Marchi
2025-08-27 22:35 ` [PATCH v2 3/6] drm/xe: Update workaround documentation Lucas De Marchi
2025-09-02 18:49   ` Summers, Stuart
2025-09-02 20:01     ` Lucas De Marchi
2025-08-27 22:35 ` [PATCH v2 4/6] drm/xe/configfs: Fix documentation warning Lucas De Marchi
2025-09-02  6:04   ` Raag Jadav
2025-08-27 22:35 ` [PATCH v2 5/6] drm/xe/lrc: Allow to add user commands on context switch Lucas De Marchi
2025-08-28  2:54   ` Lucas De Marchi
2025-08-27 22:35 ` [PATCH v2 6/6] drm/xe/configfs: Add post context restore bb Lucas De Marchi
2025-08-28  1:49 ` ✗ CI.checkpatch: warning for drm/xe: Add user commands to WA BB via configfs Patchwork
2025-08-28  1:49 ` ✗ CI.KUnit: failure " Patchwork
2025-08-28  3:00 ` ✗ CI.checkpatch: warning for drm/xe: Add user commands to WA BB via configfs (rev2) Patchwork
2025-08-28  3:01 ` ✓ CI.KUnit: success " Patchwork
2025-08-28  3:39 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-28  4:45 ` ✗ Xe.CI.Full: failure " Patchwork

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.