[PULL] drm-xe-next

Lucas De Marchi
2025-03-07T08:02:31Z

Hi Dave and Sima,

Last drm-xe-next pull request for 6.15. It comes with some big features
that we have been working on for some time: EU stall sampling and SVM.
The latter also touches other subsystems and provides the common parts
in the drm layer. Low latency hints from userspace to improve some
workloads and more events exposed via perf complete the UAPI changes
for this cycle.

Another cross-subsystem change is to drivers/base to improve devres
handling. Fixes, workarounds and refactors also made their appearance as
usual.

Worth noting 2 conflicts reported by Stephen on linux-next. One is a git
conflict and the other is on build:
https://lore.kernel.org/intel-xe/20250307122954.1ab65809@canb.auug.org.au/
and https://lore.kernel.org/intel-xe/20250307132112.18b6ce90@canb.auug.org.au/

These will probably show up when Linus merges drm. I checked the fixes
on linux-next by Stephen and they look good to me.

thanks
Lucas De Marchi

drm-xe-next-2025-03-07:
UAPI Changes:
- Expose per-engine activity via perf pmu (Riana, Lucas, Umesh)
- Add support for EU stall sampling (Harish, Ashutosh)
- Allow userspace to provide low latency hint for submission (Tejas)
- GPU SVM and Xe SVM implementation (Matthew Brost)

Cross-subsystem Changes:
- devres handling for component drivers (Lucas)
- Backmege drm-next to allow cross dependent change with i915
- GPU SVM and Xe SVM implementation (Matthew Brost)

Core Changes:

Driver Changes:
- Fixes to userptr and missing validations (Matthew Auld, Thomas
Hellström, Matthew Brost)
- devcoredump typos and error handling improvement (Shuicheng)
- Allow oa_exponent value of 0 (Umesh)
- Finish moving device probe to devm (Lucas)
- Fix race between submission restart and scheduled being freed (Tejas)
- Fix counter overflows in gt_stats (Francois)
- Refactor and add missing workarounds and tunings for pre-Xe2 platforms
(Aradhya, Tvrtko)
- Fix PXP locks interaction with exec queues being killed (Daniele)
- Eliminate TIMESTAMP_OVERRIDE from xe (Matt Roper)
- Change xe_gen_wa_oob to allow building on MacOS (Daniel Gomez)
- New workarounds for Panther Lake (Tejas)
- Fix VF resume errors (Satyanarayana)
- Fix workaround infra skipping some workarounds dependent on engine
initialization (Tvrtko)
- Improve per-IP descriptors (Gustavo)
- Add more error injections to probe sequence (Francois)
The following changes since commit 33e26f3544a558e7476eb221ff33173759b3a116:

Merge tag 'drm-xe-next-2025-02-24' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next (2025-02-27 10:08:29 +1000)

are available in the Git repository at:

https://gitlab.freedesktop.org/drm/xe/kernel.git tags/drm-xe-next-2025-03-07

for you to fetch changes up to 45f5a1efac90214d9593afb0a900a2c73e1fc95b:

drm/doc: gpusvm: Add GPU SVM documentation (2025-03-06 11:38:21 -0800)

----------------------------------------------------------------
UAPI Changes:
- Expose per-engine activity via perf pmu (Riana, Lucas, Umesh)
- Add support for EU stall sampling (Harish, Ashutosh)
- Allow userspace to provide low latency hint for submission (Tejas)
- GPU SVM and Xe SVM implementation (Matthew Brost)

Cross-subsystem Changes:
- devres handling for component drivers (Lucas)
- Backmege drm-next to allow cross dependent change with i915
- GPU SVM and Xe SVM implementation (Matthew Brost)

Core Changes:

Driver Changes:
- Fixes to userptr and missing validations (Matthew Auld, Thomas
Hellström, Matthew Brost)
- devcoredump typos and error handling improvement (Shuicheng)
- Allow oa_exponent value of 0 (Umesh)
- Finish moving device probe to devm (Lucas)
- Fix race between submission restart and scheduled being freed (Tejas)
- Fix counter overflows in gt_stats (Francois)
- Refactor and add missing workarounds and tunings for pre-Xe2 platforms
(Aradhya, Tvrtko)
- Fix PXP locks interaction with exec queues being killed (Daniele)
- Eliminate TIMESTAMP_OVERRIDE from xe (Matt Roper)
- Change xe_gen_wa_oob to allow building on MacOS (Daniel Gomez)
- New workarounds for Panther Lake (Tejas)
- Fix VF resume errors (Satyanarayana)
- Fix workaround infra skipping some workarounds dependent on engine
initialization (Tvrtko)
- Improve per-IP descriptors (Gustavo)
- Add more error injections to probe sequence (Francois)

----------------------------------------------------------------
Aradhya Bhatia (2):
drm/xe: Add Wa_16021333562 and Wa_14016712196
drm/xe/oa: Refactor WAs to use XE_WA() macro

Colin Ian King (1):
drm/xe: Fix uninitialized pointer def

Daniel Gomez (1):
drm/xe: xe_gen_wa_oob: replace program_invocation_short_name

Daniele Ceraolo Spurio (1):
drm/xe/pxp: Don't kill queues while holding PXP locks

Francois Dugast (3):
drm/xe/gt_stats: Use atomic64_t for counters
drm/xe/gt_pagefault: Change vma_pagefault unit to kilobyte
drm/xe: Allow fault injection in exec queue IOCTLs

Gustavo Sousa (7):
drm/xe: Set IP names in functions handling IP version
drm/xe: Disambiguate GMDID-based IP names
drm/xe: Rename gmdid_map to xe_ip
drm/xe: Define xe_ip instances before xe_device_desc
drm/xe: Convert pre-GMDID IPs to struct xe_ip
drm/xe: Re-use feature descriptors for pre-GMDID IPs
drm/xe: Simplify setting release info in xe->info

Harish Chegondi (8):
drm/xe/topology: Add a function to find the index of the last enabled DSS in a mask
drm/xe/uapi: Introduce API for EU stall sampling
drm/xe/eustall: Add support to init, enable and disable EU stall sampling
drm/xe/eustall: Add support to read() and poll() EU stall data
drm/xe/eustall: Add support to handle dropped EU stall data
drm/xe/eustall: Add EU stall sampling support for Xe2
drm/xe/uapi: Add a device query to get EU stall sampling information
drm/xe/eustall: Add workaround 22016596838 which applies to PVC.

Lucas De Marchi (12):
drivers: base: devres: Allow to release group on device release
drivers: base: devres: Fix find_group() documentation
drivers: base: component: Add debug message for unbind
drm/xe: Stop setting drvdata to NULL
drm/xe: Switch from xe to devm actions
drm/xe: Drop remove callback support
drm/xe/display: Drop xe_display_driver_remove()
drm/xe: Move survivability entirely to xe_pci
drm/xe: Stop ignoring errors from xe_heci_gsc_init()
drm/xe: Rename update_device_info() after sriov
drm/xe: Stop ignoring errors from xe_ttm_sys_mgr_init()
Merge drm/drm-next into drm-xe-next

Matt Roper (1):
drm/xe: Eliminate usage of TIMESTAMP_OVERRIDE

Matthew Auld (4):
drm/xe/userptr: restore invalidation list on error
drm/xe/userptr: fix EFAULT handling
drm/xe/userptr: remove tmp_evict list
drm/xe/userptr: properly setup pfn_flags_mask

Matthew Brost (29):
drm/xe: Add staging tree for VM binds
drm/xe: Retry BO allocation
mm/migrate: Add migrate_device_pfns
mm/migrate: Trylock device page in do_swap_page
drm/gpusvm: Add support for GPU Shared Virtual Memory
drm/xe: Select DRM_GPUSVM Kconfig
drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR
drm/xe: Add SVM init / close / fini to faulting VMs
drm/xe: Nuke VM's mapping upon close
drm/xe: Add SVM range invalidation and page fault
drm/gpuvm: Add DRM_GPUVA_OP_DRIVER
drm/xe: Add (re)bind to SVM page fault handler
drm/xe: Add SVM garbage collector
drm/xe: Add unbind to SVM garbage collector
drm/xe: Do not allow CPU address mirror VMA unbind if
drm/xe: Enable CPU address mirror uAPI
drm/xe/uapi: Add DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR
drm/xe: Add migrate layer functions for SVM support
drm/xe: Add SVM device memory mirroring
drm/xe: Add drm_gpusvm_devmem to xe_bo
drm/xe: Add GPUSVM device memory copy vfunc functions
drm/xe: Add Xe SVM populate_devmem_pfn GPU SVM vfunc
drm/xe: Add Xe SVM devmem_release GPU SVM vfunc
drm/xe: Add SVM VRAM migration
drm/xe: Basic SVM BO eviction
drm/xe: Add SVM debug
drm/xe: Add modparam for SVM notifier size
drm/xe: Add always_migrate_to_vram modparam
drm/doc: gpusvm: Add GPU SVM documentation

Mingcong Bai (1):
drm/xe/regs: remove a duplicate definition for RING_CTL_SIZE(size)

Riana Tauro (5):
drm/xe: Add engine activity support
drm/xe/trace: Add trace for engine activity
drm/xe/guc: Expose engine activity only for supported GuC version
drm/xe/xe_pmu: Add PMU support for engine activity
drm/xe/xe_pmu: Acquire forcewake on event init for engine events

Satyanarayana K V P (2):
drm/xe/pf: Create a link between PF and VF devices
drm/xe/vf: Retry sending MMIO request to GUC on timeout error

Shuicheng Lin (2):
drm/xe/devcoredump: Fix print typo of offset
drm/xe/devcoredump: Remove IS_ERR_OR_NULL check for kzalloc

Tejas Upadhyay (3):
drm/xe: cancel pending job timer before freeing scheduler
drm/xe/xe3lpg: Add Wa_13012615864
drm/xe/uapi: Use hint for guc to set GT frequency

Thomas Hellström (10):
drm/xe/vm: Validate userptr during gpu vma prefetching
drm/xe/vm: Fix a misplaced #endif
drm/xe: Fix fault mode invalidation with unbind
drm/xe/hmm: Style- and include fixes
drm/xe/hmm: Don't dereference struct page pointers without notifier lock
drm/xe/userptr: Unmap userptrs in the mmu notifier
drm/pagemap: Add DRM pagemap
drm/xe/bo: Introduce xe_bo_put_async
drm/xe: Add dma_addr res cursor
drm/xe: Add drm_pagemap ops to SVM

Tvrtko Ursulin (5):
drm/xe: Fix GT "for each engine" workarounds
drm/xe/xelp: Move Wa_16011163337 from tunings to workarounds
drm/xe/xelp: Add Wa_1604555607
drm/xe/xelp: L3 recommended hashing mask
drm/xe: Add performance tunings to debugfs

Umesh Nerlige Ramappa (1):
drm/xe/oa: Allow oa_exponent value of 0

Documentation/gpu/rfc/gpusvm.rst | 107 +
Documentation/gpu/rfc/index.rst | 4 +
drivers/base/component.c | 3 +
drivers/base/devres.c | 12 +-
drivers/gpu/drm/Kconfig | 9 +
drivers/gpu/drm/Makefile | 1 +
drivers/gpu/drm/drm_gpusvm.c | 2236 +++++++++++++++++++++
drivers/gpu/drm/xe/Kconfig | 10 +
drivers/gpu/drm/xe/Makefile | 3 +
drivers/gpu/drm/xe/abi/guc_actions_abi.h | 1 +
drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h | 3 +
drivers/gpu/drm/xe/display/xe_display.c | 13 +-
drivers/gpu/drm/xe/display/xe_display.h | 1 -
drivers/gpu/drm/xe/regs/xe_engine_regs.h | 1 -
drivers/gpu/drm/xe/regs/xe_eu_stall_regs.h | 29 +
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 7 +-
drivers/gpu/drm/xe/regs/xe_regs.h | 4 -
drivers/gpu/drm/xe/tests/xe_pci.c | 26 +-
drivers/gpu/drm/xe/xe_bo.c | 54 +
drivers/gpu/drm/xe/xe_bo.h | 20 +
drivers/gpu/drm/xe/xe_bo_types.h | 4 +
drivers/gpu/drm/xe/xe_devcoredump.c | 8 +-
drivers/gpu/drm/xe/xe_device.c | 101 +-
drivers/gpu/drm/xe/xe_device.h | 3 -
drivers/gpu/drm/xe/xe_device_sysfs.c | 6 -
drivers/gpu/drm/xe/xe_device_types.h | 36 +-
drivers/gpu/drm/xe/xe_eu_stall.c | 960 +++++++++
drivers/gpu/drm/xe/xe_eu_stall.h | 24 +
drivers/gpu/drm/xe/xe_exec_queue.c | 11 +-
drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 +
drivers/gpu/drm/xe/xe_gen_wa_oob.c | 6 +-
drivers/gpu/drm/xe/xe_gsc_proxy.c | 2 +-
drivers/gpu/drm/xe/xe_gt.c | 13 +-
drivers/gpu/drm/xe/xe_gt_clock.c | 53 +-
drivers/gpu/drm/xe/xe_gt_debugfs.c | 11 +
drivers/gpu/drm/xe/xe_gt_pagefault.c | 20 +-
drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c | 5 -
drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 9 +-
drivers/gpu/drm/xe/xe_gt_stats.c | 8 +-
drivers/gpu/drm/xe/xe_gt_stats_types.h | 2 +-
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 22 +
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h | 2 +
drivers/gpu/drm/xe/xe_gt_topology.h | 13 +
drivers/gpu/drm/xe/xe_gt_types.h | 15 +-
drivers/gpu/drm/xe/xe_guc.c | 5 +
drivers/gpu/drm/xe/xe_guc_ads.c | 2 +-
drivers/gpu/drm/xe/xe_guc_engine_activity.c | 373 ++++
drivers/gpu/drm/xe/xe_guc_engine_activity.h | 19 +
drivers/gpu/drm/xe/xe_guc_engine_activity_types.h | 92 +
drivers/gpu/drm/xe/xe_guc_fwif.h | 19 +
drivers/gpu/drm/xe/xe_guc_pc.c | 16 +
drivers/gpu/drm/xe/xe_guc_submit.c | 10 +
drivers/gpu/drm/xe/xe_guc_types.h | 4 +
drivers/gpu/drm/xe/xe_heci_gsc.c | 39 +-
drivers/gpu/drm/xe/xe_heci_gsc.h | 3 +-
drivers/gpu/drm/xe/xe_hmm.c | 194 +-
drivers/gpu/drm/xe/xe_hmm.h | 7 +
drivers/gpu/drm/xe/xe_hw_engine_group.c | 1 +
drivers/gpu/drm/xe/xe_migrate.c | 175 ++
drivers/gpu/drm/xe/xe_migrate.h | 10 +
drivers/gpu/drm/xe/xe_module.c | 7 +
drivers/gpu/drm/xe/xe_module.h | 2 +
drivers/gpu/drm/xe/xe_oa.c | 35 +-
drivers/gpu/drm/xe/xe_observation.c | 14 +
drivers/gpu/drm/xe/xe_pci.c | 245 +--
drivers/gpu/drm/xe/xe_pci_sriov.c | 51 +
drivers/gpu/drm/xe/xe_pci_types.h | 15 +-
drivers/gpu/drm/xe/xe_pmu.c | 175 +-
drivers/gpu/drm/xe/xe_pt.c | 495 ++++-
drivers/gpu/drm/xe/xe_pt.h | 5 +
drivers/gpu/drm/xe/xe_pt_types.h | 2 +
drivers/gpu/drm/xe/xe_pt_walk.c | 3 +-
drivers/gpu/drm/xe/xe_pt_walk.h | 4 +
drivers/gpu/drm/xe/xe_pxp.c | 90 +-
drivers/gpu/drm/xe/xe_query.c | 50 +-
drivers/gpu/drm/xe/xe_res_cursor.h | 123 +-
drivers/gpu/drm/xe/xe_ring_ops.c | 4 +
drivers/gpu/drm/xe/xe_survivability_mode.c | 77 +-
drivers/gpu/drm/xe/xe_survivability_mode.h | 5 +-
drivers/gpu/drm/xe/xe_svm.c | 946 +++++++++
drivers/gpu/drm/xe/xe_svm.h | 150 ++
drivers/gpu/drm/xe/xe_tile.c | 5 +
drivers/gpu/drm/xe/xe_trace.h | 30 +
drivers/gpu/drm/xe/xe_trace_guc.h | 49 +
drivers/gpu/drm/xe/xe_tuning.c | 72 +-
drivers/gpu/drm/xe/xe_tuning.h | 3 +
drivers/gpu/drm/xe/xe_uc.c | 3 +
drivers/gpu/drm/xe/xe_vm.c | 521 ++++-
drivers/gpu/drm/xe/xe_vm.h | 25 +-
drivers/gpu/drm/xe/xe_vm_types.h | 65 +-
drivers/gpu/drm/xe/xe_wa.c | 19 +
drivers/gpu/drm/xe/xe_wa_oob.rules | 10 +
include/drm/drm_gpusvm.h | 509 +++++
include/drm/drm_gpuvm.h | 5 +
include/drm/drm_pagemap.h | 107 +
include/linux/migrate.h | 1 +
include/uapi/drm/xe_drm.h | 117 +-
mm/memory.c | 13 +-
mm/migrate_device.c | 120 +-
99 files changed, 8220 insertions(+), 801 deletions(-)
create mode 100644 Documentation/gpu/rfc/gpusvm.rst
create mode 100644 drivers/gpu/drm/drm_gpusvm.c
create mode 100644 drivers/gpu/drm/xe/regs/xe_eu_stall_regs.h
create mode 100644 drivers/gpu/drm/xe/xe_eu_stall.c
create mode 100644 drivers/gpu/drm/xe/xe_eu_stall.h
create mode 100644 drivers/gpu/drm/xe/xe_guc_engine_activity.c
create mode 100644 drivers/gpu/drm/xe/xe_guc_engine_activity.h
create mode 100644 drivers/gpu/drm/xe/xe_guc_engine_activity_types.h
create mode 100644 drivers/gpu/drm/xe/xe_svm.c
create mode 100644 drivers/gpu/drm/xe/xe_svm.h
create mode 100644 include/drm/drm_gpusvm.h
create mode 100644 include/drm/drm_pagemap.h