[PATCH v2 0/9] Introduce Xe PCIe FLR

Raag Jadav
2026-02-27T17:03:15Z

Here's my humble attempt at introducing PCIe Function Level Reset (FLR)
support in xe driver. This is ofcourse a half baked implementation and
only limited to reloading GT. This needs to be extended for a lot of
different components which I've skipped here for my lack of competence,
so feel free to join in and support them.

PS: All xe_exec_basic tests and clpeak run smoothly after FLR. Give it
a spin and let me know if any regressions.

Trigger it with:

$ echo 1 > /sys/bus/pci/devices/<BDF>/reset

v2: Re-initialize migrate context (Matthew Brost)
Add kernel doc (Matthew Brost)
Spell out Function Level Reset (Jani)

Raag Jadav (9):
drm/xe/uc_fw: Allow re-initializing firmware
drm/xe/gt: Introduce FLR helpers
drm/xe/irq: Introduce xe_irq_disable()
drm/xe: Introduce xe_device_assert_lmem_ready()
drm/xe/bo_evict: Introduce xe_bo_restore_map()
drm/xe/lrc: Introduce xe_lrc_reinit()
drm/xe/exec_queue: Introduce xe_exec_queue_reinit()
drm/xe/migrate: Introduce xe_migrate_reinit()
drm/xe/pci: Introduce PCIe FLR

drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/xe_bo_evict.c | 51 ++++++++--
drivers/gpu/drm/xe/xe_bo_evict.h | 2 +
drivers/gpu/drm/xe/xe_device.c | 10 +-
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_exec_queue.c | 34 ++++++-
drivers/gpu/drm/xe/xe_exec_queue.h | 1 +
drivers/gpu/drm/xe/xe_gsc.c | 14 +++
drivers/gpu/drm/xe/xe_gsc.h | 1 +
drivers/gpu/drm/xe/xe_gt.c | 32 ++++++
drivers/gpu/drm/xe/xe_gt.h | 2 +
drivers/gpu/drm/xe/xe_guc.c | 14 +++
drivers/gpu/drm/xe/xe_guc.h | 1 +
drivers/gpu/drm/xe/xe_huc.c | 14 +++
drivers/gpu/drm/xe/xe_huc.h | 1 +
drivers/gpu/drm/xe/xe_irq.c | 13 ++-
drivers/gpu/drm/xe/xe_irq.h | 1 +
drivers/gpu/drm/xe/xe_lrc.c | 149 ++++++++++++++++------------
drivers/gpu/drm/xe/xe_lrc.h | 2 +
drivers/gpu/drm/xe/xe_migrate.c | 65 ++++++++++---
drivers/gpu/drm/xe/xe_migrate.h | 1 +
drivers/gpu/drm/xe/xe_pci.c | 1 +
drivers/gpu/drm/xe/xe_pci.h | 2 +
drivers/gpu/drm/xe/xe_pci_err.c | 150 +++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_uc.c | 36 +++++++
drivers/gpu/drm/xe/xe_uc.h | 2 +
drivers/gpu/drm/xe/xe_uc_fw.c | 39 ++++++--
drivers/gpu/drm/xe/xe_uc_fw.h | 1 +
28 files changed, 544 insertions(+), 97 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_pci_err.c

--
2.43.0