Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] drm/xe: Add user commands to WA BB via configfs
@ 2025-09-11 19:36 Lucas De Marchi
  2025-09-11 19:36 ` [PATCH v4 1/6] drm/xe: Update workaround documentation Lucas De Marchi
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Lucas De Marchi @ 2025-09-11 19:36 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

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 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 (6):
      drm/xe: Update workaround documentation
      drm/xe/configfs: Fix documentation warning
      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

 drivers/gpu/drm/xe/xe_configfs.c | 369 ++++++++++++++++++++++++++++++++++++---
 drivers/gpu/drm/xe/xe_configfs.h |   6 +
 drivers/gpu/drm/xe/xe_lrc.c      |  32 ++++
 drivers/gpu/drm/xe/xe_wa.c       |  45 +++--
 4 files changed, 414 insertions(+), 38 deletions(-)

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

Lucas De Marchi


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

end of thread, other threads:[~2025-09-16 21:19 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-11 19:36 [PATCH v4 0/6] drm/xe: Add user commands to WA BB via configfs Lucas De Marchi
2025-09-11 19:36 ` [PATCH v4 1/6] drm/xe: Update workaround documentation Lucas De Marchi
2025-09-11 19:36 ` [PATCH v4 2/6] drm/xe/configfs: Fix documentation warning Lucas De Marchi
2025-09-11 19:36 ` [PATCH v4 3/6] drm/xe/configfs: Extract function to parse engine Lucas De Marchi
2025-09-11 19:36 ` [PATCH v4 4/6] drm/xe/configfs: Allow to select by class only Lucas De Marchi
2025-09-12  5:18   ` Raag Jadav
2025-09-12  5:30     ` Lucas De Marchi
2025-09-12  5:58       ` Raag Jadav
2025-09-11 19:36 ` [PATCH v4 5/6] drm/xe/lrc: Allow to add user commands on context switch Lucas De Marchi
2025-09-16 20:27   ` Rodrigo Vivi
2025-09-16 21:07     ` Lucas De Marchi
2025-09-16 21:16       ` Rodrigo Vivi
2025-09-16 21:19       ` Lucas De Marchi
2025-09-11 19:36 ` [PATCH v4 6/6] drm/xe/configfs: Add post context restore bb Lucas De Marchi
2025-09-12  8:05   ` Raag Jadav
2025-09-12 14:07     ` Lucas De Marchi
2025-09-12 16:56       ` Raag Jadav
2025-09-11 20:19 ` ✗ CI.checkpatch: warning for drm/xe: Add user commands to WA BB via configfs Patchwork
2025-09-11 20:20 ` ✓ CI.KUnit: success " Patchwork
2025-09-11 21:06 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-12  3:16 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox