Skip to content

Introduce Xe PCIe FLR

Raag Jadav intel-xe 16 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v16 Latest10 patches 0 repliesNew
  2. v1510 patches 0 repliesSuperseded
  3. v1410 patches 4 repliesSuperseded
Earlier versions · 13
VersionPostedPatchesRepliesStatus
v1310 patches1 replySuperseded
v1210 patches0 repliesSuperseded
v1110 patches3 repliesSuperseded
v1010 patches17 repliesSuperseded
v910 patches8 repliesSuperseded
v810 patches12 repliesSuperseded
v78 patches10 repliesSuperseded
v68 patches7 repliesSuperseded
v59 patches19 repliesSuperseded
v49 patches4 repliesSuperseded
v310 patches3 repliesSuperseded
v29 patches10 repliesSuperseded
v16 patches11 repliesSuperseded

Patches in v16 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10drm/xe/uc_fw: Allow re-initializing firmwaredrivers/gpu/drm/xe/xe_uc_fw.c drivers/gpu/drm/xe/xe_uc_fw.h+68 -00 replies
2/10drm/xe/guc_submit: Introduce guc_exec_queue_reinit_kernel()drivers/gpu/drm/xe/xe_exec_queue_types.h drivers/gpu/drm/xe/xe_execlist.c drivers/gpu/drm/xe/xe_gpu_scheduler.c +3 more+40 -00 replies
3/10drm/xe/gt: Introduce FLR helpersdrivers/gpu/drm/xe/xe_gsc.c drivers/gpu/drm/xe/xe_gsc.h drivers/gpu/drm/xe/xe_gt.c +8 more+181 -00 replies
4/10drm/xe/bo_evict: Introduce xe_bo_restore_map()drivers/gpu/drm/xe/xe_bo_evict.c drivers/gpu/drm/xe/xe_bo_evict.h+37 -70 replies
5/10drm/xe/exec_queue: Introduce xe_exec_queue_reinit()drivers/gpu/drm/xe/xe_exec_queue.c drivers/gpu/drm/xe/xe_exec_queue.h drivers/gpu/drm/xe/xe_lrc.c +1 more+59 -60 replies
6/10drm/xe/migrate: Introduce xe_migrate_reinit() and xe_cpu_bind_reinit()drivers/gpu/drm/xe/xe_cpu_bind.c drivers/gpu/drm/xe/xe_cpu_bind.h drivers/gpu/drm/xe/xe_gt.c +2 more+75 -20 replies
7/10drm/xe/pm: Introduce xe_device_suspend/resume()drivers/gpu/drm/xe/xe_device.c drivers/gpu/drm/xe/xe_device.h drivers/gpu/drm/xe/xe_pm.c +1 more+174 -980 replies
8/10drm/xe: Introduce temporary device wedgingdrivers/gpu/drm/xe/xe_guc_ct.c drivers/gpu/drm/xe/xe_pci.c drivers/gpu/drm/xe/xe_pci_error.c +3 more+84 -240 replies
9/10drm/xe/pci: Introduce PCIe Function Level Resetdrivers/gpu/drm/xe/xe_device_types.h drivers/gpu/drm/xe/xe_pci_error.c+135 -00 replies
10/10drm/xe/doc: Wire up PCI Error HandlingDocumentation/gpu/xe/index.rst Documentation/gpu/xe/xe_pci_error.rst+9 -00 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchLukasz LagunaDaniele Ceraolo SpurioMatthew BrostVarun GuptaRodrigo ViviRiana Tauro
1/10T-b R-b
2/10T-b R-b
3/10T-b R-b
4/10T-b R-b
5/10T-b R-b
6/10T-b R-b
7/10R-b
8/10R-b
9/10T-b A-b R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v16 thread

Cover letter [PATCH v16 00/10] Introduce Xe PCIe FLR

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 re-initializing GT. This needs to be extended for a lot of components which are expected to be added as a follow up.

Detailed description in commit message and documentation.

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)

v3: Cancel in-flight jobs before FLR

v4: Teardown exec queues instead of mangling scheduler pending list (Matthew Brost)

v5: Re-initialize kernel queues through submission backend (Matthew Brost)
Prevent PM ref leak for wedged device (Matthew Brost)

v6: Skip uC firmware selection during re-initialization (Daniele)
Add IS_DGFX() and EXEC_QUEUE_FLAG_KERNEL asserts (Daniele) s/flr_done/reinit (Daniele)
Repurpose system suspend/resume helpers for FLR (Daniele) Add PCIe FLR documentation (Daniele)

v7: Refine PCIe FLR documentation (Daniele)
Introduce xe_pci_reset_skip() helper (Lukasz)

v8: Set fw state to XE_UC_FIRMWARE_INIT_FAIL on failure (Daniele)
Introduce xe_sched_reinit() (Daniele)
Maintain timeout per scheduler instance (Daniele) s/reinit/reinit_kernel (Daniele)

v9: Move drm_sched_is_stopped() assert to xe_sched_reinit() (Daniele)
Add negative asserts for GSC and PXP (Daniele)
Provide xe_lrc_ctx_init() as regular function (Daniele) Redesign wedged state management to prevent races (Sashiko) Add 'Xe' prefix to document title (Rodrigo)

v10: Spell out temporary device wedging in subject (Lukasz)
Update documentation to include PCI Error Handling (Lukasz) Maintain wedge reference on FLR failure (Lukasz)

v11: Wait for xe_pcode_ready() before resume (Riana)
Update GuC CT path to check against permanent wedging (Lukasz, Riana) Put wedge reference only if device is wedged during resume() (Riana) Cleanup wedge reference logic in ->reset_prepare() (Lukasz) Use 'PCI reset' in logs (Riana)

v12: s/xe_wedge_not_recoverable/xe_wedged_permanent (Riana)
Refine error logging and documentation (Riana)

v13: Handle ULLS fini (Sashiko)
Re-initialize cpu bind queue (Sashiko) Prevent PM ref leak on slot reset failure (Sashiko)

v14: Early return on survivability mode (Riana)

v15: Rebase

v16: Stop GuC CT before exec queue teardown (Riana, Sashiko)
Avoid various race conditions (Sashiko)

Raag Jadav (10):
drm/xe/uc_fw: Allow re-initializing firmware drm/xe/guc_submit: Introduce guc_exec_queue_reinit_kernel() drm/xe/gt: Introduce FLR helpers
drm/xe/bo_evict: Introduce xe_bo_restore_map() drm/xe/exec_queue: Introduce xe_exec_queue_reinit() drm/xe/migrate: Introduce xe_migrate_reinit() and xe_cpu_bind_reinit() drm/xe/pm: Introduce xe_device_suspend/resume()
drm/xe: Introduce temporary device wedging
drm/xe/pci: Introduce PCIe Function Level Reset drm/xe/doc: Wire up PCI Error Handling

 Documentation/gpu/xe/index.rst              |   1 +
 Documentation/gpu/xe/xe_pci_error.rst       |   8 +
 drivers/gpu/drm/xe/xe_bo_evict.c            |  43 +++++-
 drivers/gpu/drm/xe/xe_bo_evict.h            |   1 +
 drivers/gpu/drm/xe/xe_cpu_bind.c            |  11 ++
 drivers/gpu/drm/xe/xe_cpu_bind.h            |   1 +
 drivers/gpu/drm/xe/xe_device.c              | 155 +++++++++++++++++++
 drivers/gpu/drm/xe/xe_device.h              |   2 +
 drivers/gpu/drm/xe/xe_device_types.h        |   3 +
 drivers/gpu/drm/xe/xe_exec_queue.c          |  47 +++++-
 drivers/gpu/drm/xe/xe_exec_queue.h          |   1 +
 drivers/gpu/drm/xe/xe_exec_queue_types.h    |   2 +
 drivers/gpu/drm/xe/xe_execlist.c            |   6 +
 drivers/gpu/drm/xe/xe_gpu_scheduler.c       |  17 +++
 drivers/gpu/drm/xe/xe_gpu_scheduler.h       |   1 +
 drivers/gpu/drm/xe/xe_gpu_scheduler_types.h |   5 +
 drivers/gpu/drm/xe/xe_gsc.c                 |  14 ++
 drivers/gpu/drm/xe/xe_gsc.h                 |   1 +
 drivers/gpu/drm/xe/xe_gt.c                  |  42 ++++++
 drivers/gpu/drm/xe/xe_gt.h                  |   2 +
 drivers/gpu/drm/xe/xe_guc.c                 |  29 ++++
 drivers/gpu/drm/xe/xe_guc.h                 |   2 +
 drivers/gpu/drm/xe/xe_guc_ct.c              |   6 +-
 drivers/gpu/drm/xe/xe_guc_submit.c          |   9 ++
 drivers/gpu/drm/xe/xe_huc.c                 |  14 ++
 drivers/gpu/drm/xe/xe_huc.h                 |   1 +
 drivers/gpu/drm/xe/xe_lrc.c                 |  15 +-
 drivers/gpu/drm/xe/xe_lrc.h                 |   2 +
 drivers/gpu/drm/xe/xe_migrate.c             |  46 +++++-
 drivers/gpu/drm/xe/xe_migrate.h             |   2 +
 drivers/gpu/drm/xe/xe_pci.c                 |   2 +
 drivers/gpu/drm/xe/xe_pci_error.c           | 156 ++++++++++++++++++--
 drivers/gpu/drm/xe/xe_pm.c                  | 114 ++------------
 drivers/gpu/drm/xe/xe_pm.h                  |   1 +
 drivers/gpu/drm/xe/xe_uc.c                  |  77 ++++++++++
 drivers/gpu/drm/xe/xe_uc.h                  |   2 +
 drivers/gpu/drm/xe/xe_uc_fw.c               |  67 +++++++++
 drivers/gpu/drm/xe/xe_uc_fw.h               |   1 +
 drivers/gpu/drm/xe/xe_uc_types.h            |  14 ++
 drivers/gpu/drm/xe/xe_wedge.c               |  48 +++++-
 drivers/gpu/drm/xe/xe_wedge.h               |  13 +-
 drivers/gpu/drm/xe/xe_wedge_types.h         |  13 +-
 42 files changed, 861 insertions(+), 136 deletions(-)
 create mode 100644 Documentation/gpu/xe/xe_pci_error.rst
Signature · 1 line
2.43.0