Skip to content

Gen8+ engine-reset

Michel Thierry intel-gfx 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest21 patches 5 repliesIn review
  2. v820 patches 8 repliesSuperseded
  3. v720 patches 21 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v620 patches28 repliesApplied
v518 patches21 repliesSuperseded

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21drm/i915: Look for active requests earlier in the reset pathdrivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/intel_ringbuffer.h+8 -70 replies
2/21drm/i915: Update i915.reset to handle engine resetsdrivers/gpu/drm/i915/i915_params.c drivers/gpu/drm/i915/i915_params.h+4 -40 replies
3/21drm/i915: Modify error handler for per engine hang recoverydrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_irq.c +2 more+83 -10 replies
4/21drm/i915: Include reset engine information in has_gpu_reset getparamdrivers/gpu/drm/i915/i915_drv.c+2 -00 replies
5/21drm/i915: Add support for per engine reset recoverydrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c+109 -403 replies
6/21drm/i915: Add engine reset count to error statedrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gpu_error.c+16 -00 replies
7/21drm/i915: Export per-engine reset count info to debugfsdrivers/gpu/drm/i915/i915_debugfs.c+21 -00 replies
8/21drm/i915: Carry on with reset even if hw engine is not readydrivers/gpu/drm/i915/intel_uncore.c+6 -20 replies
9/21drm/i915: Enable Engine reset and recovery supportdrivers/gpu/drm/i915/i915_params.c+2 -20 replies
10/21drm/i915: Add engine reset count in get-reset-stats ioctldrivers/gpu/drm/i915/i915_gem_context.c include/uapi/drm/i915_drm.h+15 -32 replies
11/21drm/i915/selftests: reset engine self testsdrivers/gpu/drm/i915/selftests/intel_hangcheck.c+150 -00 replies
12/21drm/i915/guc: fix mmio whitelist mmio_start offset and add reminderdrivers/gpu/drm/i915/i915_guc_submission.c drivers/gpu/drm/i915/intel_guc_fwif.h+9 -30 replies
13/21drm/i915/guc: Provide register list to be saved/restored during engine resetdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_guc_submission.c drivers/gpu/drm/i915/intel_engine_cs.c+116 -220 replies
14/21drm/i915/guc: Rename the function that resets the GuCdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_uc.c drivers/gpu/drm/i915/intel_uncore.c+4 -40 replies
15/21drm/i915/guc: Add support for reset engine using GuC commandsdrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_guc_submission.c +3 more+75 -100 replies
16/21drm/i915: Watchdog timeout: Pass GuC shared data structure during param loaddrivers/gpu/drm/i915/i915_guc_submission.c drivers/gpu/drm/i915/intel_guc_fwif.h drivers/gpu/drm/i915/intel_guc_loader.c +1 more+20 -160 replies
17/21drm/i915: Watchdog timeout: IRQ handler for gen8+drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_irq.c drivers/gpu/drm/i915/i915_reg.h +3 more+108 -70 replies
18/21drm/i915: Watchdog timeout: Ringbuffer command emission for gen8+drivers/gpu/drm/i915/i915_gem_context.h drivers/gpu/drm/i915/intel_lrc.c drivers/gpu/drm/i915/intel_ringbuffer.h+89 -40 replies
19/21drm/i915: Watchdog timeout: DRM kernel interface to set the timeoutdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem_context.c drivers/gpu/drm/i915/intel_lrc.c +1 more+155 -20 replies
20/21drm/i915: Watchdog timeout: Include threshold value in error statedrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gpu_error.c+9 -40 replies
21/21drm/i915: Watchdog timeout: Export media reset count from GuC to debugfsdrivers/gpu/drm/i915/i915_debugfs.c drivers/gpu/drm/i915/intel_guc_fwif.h+40 -00 replies

Reviews trailers per patch

4 of 21 patches have a Reviewed-by or Acked-by.

PatchChris WilsonMichał WiniarskiTvrtko UrsulinDaniele Ceraolo Spurio
1/21R-b
2/21
3/21
4/21
5/21
6/21
7/21
8/21
9/21
10/21
11/21
12/21R-b
13/21
14/21R-b
15/21
16/21R-b
17/21
18/21
19/21
20/21
21/21

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

Read the v9 thread

Cover letter [PATCH v9 00/21] Gen8+ engine-reset

These patches add the reset-engine feature from Gen8. This is also referred to as Timeout detection and recovery (TDR). This complements to the full gpu reset feature available in i915 but it only allows to reset a particular engine instead of all engines thus providing a light weight engine reset and recovery mechanism.

Thanks to recent changes merged, this implementation is now not only for execlists, but for GuC based submission too; it is still limited from Gen8 onwards. I have also included the changes for watchdog timeout detection. The GuC related patches are functional, but can be seen as RFC.

Timeout detection relies on the existing hangcheck, which remains the same; main changes are to the recovery mechanism. Once we detect a hang on a particular engine we identify the request that caused the hang, skip the request and adjust head pointers to allow the execution to proceed normally. After some cleanup, submissions are restarted to process remaining work queued to that engine.

If engine reset fails to recover engine correctly then we fallback to full gpu reset.

We can argue about the effectiveness of reset-engine vs full reset when more than one ring is hung, but the benefits of just resetting one engine are reduced when the driver has to do it multiple times.

v2: ELSP queue request tracking and reset path changes to handle incomplete requests during reset. Thanks to Chris Wilson for providing these patches.

v3: Let the waiter keep handling the full gpu reset if it already has the lock; point out that GuC submission needs a different method to restart workloads after the engine reset completes.

v4: Handle reset as 2 level resets, by first going to engine only and fall backing to full/chip reset as needed, i.e. reset_engine will need the struct_mutex.

v5: Rebased after reset flag split in 2, add GuC support, include watchdog detection patches, addressing comments from prev RFC.

v6: Mutex-less reset engine. Updates in watchdog abi and guc whitelist & register-restore fixes (including an old patch from Daniele).

v7: Removed leftovers from v5; review comments; ability to cancel the reset if there's no active request.

v8: Moved patch looking for active request at the beginning of these series; drop patch to request the engine's reset readinnes earlier since this is done during the reset flow too; warn if hw fails to acknowledge reset _readiness_.

v9: Support parallel resets (in different engines). Return type of reset available in get-param ioctl. Watchdog timeout won't capture the error state.

Daniele Ceraolo Spurio (1):
drm/i915/guc: fix mmio whitelist mmio_start offset and add reminder

Michel Thierry (20):
drm/i915: Look for active requests earlier in the reset path drm/i915: Update i915.reset to handle engine resets drm/i915: Modify error handler for per engine hang recovery drm/i915: Include reset engine information in has_gpu_reset getparam drm/i915: Add support for per engine reset recovery drm/i915: Add engine reset count to error state
drm/i915: Export per-engine reset count info to debugfs drm/i915: Carry on with reset even if hw engine is not ready drm/i915: Enable Engine reset and recovery support drm/i915: Add engine reset count in get-reset-stats ioctl drm/i915/selftests: reset engine self tests
drm/i915/guc: Provide register list to be saved/restored during engine
reset
drm/i915/guc: Rename the function that resets the GuC drm/i915/guc: Add support for reset engine using GuC commands drm/i915: Watchdog timeout: Pass GuC shared data structure during
param load
drm/i915: Watchdog timeout: IRQ handler for gen8+ drm/i915: Watchdog timeout: Ringbuffer command emission for gen8+ drm/i915: Watchdog timeout: DRM kernel interface to set the timeout drm/i915: Watchdog timeout: Include threshold value in error state drm/i915: Watchdog timeout: Export media reset count from GuC to
debugfs

 drivers/gpu/drm/i915/i915_debugfs.c              |  43 +++++++
 drivers/gpu/drm/i915/i915_drv.c                  |  76 +++++++++++
 drivers/gpu/drm/i915/i915_drv.h                  |  92 +++++++++++++-
 drivers/gpu/drm/i915/i915_gem.c                  | 104 +++++++++------
 drivers/gpu/drm/i915/i915_gem_context.c          | 107 +++++++++++++++-
 drivers/gpu/drm/i915/i915_gem_context.h          |   4 +
 drivers/gpu/drm/i915/i915_gpu_error.c            |  15 ++-
 drivers/gpu/drm/i915/i915_guc_submission.c       | 138 ++++++++++++++++++--
 drivers/gpu/drm/i915/i915_irq.c                  |  62 ++++++++-
 drivers/gpu/drm/i915/i915_params.c               |   6 +-
 drivers/gpu/drm/i915/i915_params.h               |   2 +-
 drivers/gpu/drm/i915/i915_pci.c                  |   5 +-
 drivers/gpu/drm/i915/i915_reg.h                  |   6 +
 drivers/gpu/drm/i915/intel_engine_cs.c           |  65 +++++++---
 drivers/gpu/drm/i915/intel_guc_fwif.h            |  27 +++-
 drivers/gpu/drm/i915/intel_guc_loader.c          |  11 ++
 drivers/gpu/drm/i915/intel_hangcheck.c           |  13 +-
 drivers/gpu/drm/i915/intel_lrc.c                 | 155 ++++++++++++++++++++++-
 drivers/gpu/drm/i915/intel_ringbuffer.h          |   9 ++
 drivers/gpu/drm/i915/intel_uc.c                  |   4 +-
 drivers/gpu/drm/i915/intel_uc.h                  |   3 +
 drivers/gpu/drm/i915/intel_uncore.c              |  16 ++-
 drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 150 ++++++++++++++++++++++
 include/uapi/drm/i915_drm.h                      |   7 +-
 24 files changed, 1015 insertions(+), 105 deletions(-)
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx