Skip to content

Enable pipe reset for compute

Alex Deucher amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest42 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/42drm/amdkfd: always resume_all after suspend_alldrivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+6 -141 reply
2/42drm/amdgpu: don't reemit if there is nothing to reemitdrivers/gpu/drm/amd/amdgpu/amdgpu_fence.c+9 -01 reply
3/42drm/amdgpu: track guilty fence for queue resetdrivers/gpu/drm/amd/amdgpu/amdgpu_fence.c drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h+12 -01 reply
4/42drm/amdgpu/fence: add helper to extract the guilty fencedrivers/gpu/drm/amd/amdgpu/amdgpu_fence.c drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h+33 -00 replies
5/42drm/amdgpu: amdgpu_ring_set_fence_errors_and_reemit() handle NULL fencedrivers/gpu/drm/amd/amdgpu/amdgpu_fence.c+2 -10 replies
6/42drm/amdgpu/vcn: handle pipe reset more gracefullydrivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c+40 -240 replies
7/42drm/amdgpu/sdma: handle pipe reset more gracefullydrivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c+15 -40 replies
8/42drm/amdgpu/mes12: use proper grbm_select functiondrivers/gpu/drm/amd/amdgpu/mes_v12_0.c+17 -170 replies
9/42drm/amdgpu/gfx11: only need to remap KCQs when reset via MMIOdrivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+13 -100 replies
10/42drm/amdgpu/gfx12: only need to remap KCQs when reset via MMIOdrivers/gpu/drm/amd/amdgpu/gfx_v12_0.c+13 -100 replies
11/42drm/amdgpu/mes_v12_0: use mes schedule pipe for legacy queues on unified MESdrivers/gpu/drm/amd/amdgpu/mes_v12_0.c+17 -100 replies
12/42drm/amdgpu/mes_v12_1: use mes schedule pipe for legacy queues on unified MESdrivers/gpu/drm/amd/amdgpu/mes_v12_1.c+16 -61 reply
13/42drm/amdgpu/gfx11: Refactor compute pipe reset and add HQD cleanupdrivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+100 -662 replies
14/42drm/amdgpu/gfx12: Refactor compute pipe reset and add HQD cleanupdrivers/gpu/drm/amd/amdgpu/gfx_v12_0.c+77 -462 replies
15/42drm/amdgpu/mes11: move pipe reset to mes use_mmio patchdrivers/gpu/drm/amd/amdgpu/gfx_v11_0.c drivers/gpu/drm/amd/amdgpu/mes_v11_0.c+253 -2441 reply
16/42drm/amdgpu/mes12: move pipe reset to mes use_mmio patchdrivers/gpu/drm/amd/amdgpu/gfx_v12_0.c drivers/gpu/drm/amd/amdgpu/mes_v12_0.c+205 -1930 replies
17/42drm/amdgpu/mes: add userq reset helperdrivers/gpu/drm/amd/amdgpu/amdgpu_mes.c drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h+27 -00 replies
18/42drm/amdgpu/mes: add a MMIO queue reset helperdrivers/gpu/drm/amd/amdgpu/amdgpu_mes.c drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h+37 -00 replies
19/42drm/amdgpu/userq: split the queue reset from adapter resetdrivers/gpu/drm/amd/amdgpu/amdgpu_userq.c+34 -230 replies
20/42drm/amdgpu/userq: add per queue reset callbackdrivers/gpu/drm/amd/amdgpu/amdgpu_userq.h+1 -00 replies
21/42drm/amdgpu/userq: add mes userq reset callbackdrivers/gpu/drm/amd/amdgpu/mes_userqueue.c+21 -02 replies
22/42drm/amdgpu/userq: switch to per queue resetdrivers/gpu/drm/amd/amdgpu/amdgpu_userq.c+10 -280 replies
23/42drm/amdgpu/userq: drop detect_and_reset callbackdrivers/gpu/drm/amd/amdgpu/amdgpu_userq.h drivers/gpu/drm/amd/amdgpu/mes_userqueue.c+0 -550 replies
24/42drm/amd/amdgpu/include : update mes api header v11/v12drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h drivers/gpu/drm/amd/include/mes_v11_api_def.h drivers/gpu/drm/amd/include/mes_v12_api_def.h+9 -40 replies
25/42drm/amdgpu: Allocate enough space for hpd info on gfx11drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c+1 -10 replies
26/42drm/amdkfd: rework MES queue reset sequencedrivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+14 -71 reply
27/42drm/amdgpu/gfx: add a helper for MQD restoredrivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h+25 -00 replies
28/42drm/amdgpu/gfx11: use the new MQD helper for queue resetdrivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+9 -160 replies
29/42drm/amdgpu/gfx12: use the new MQD helper for queue resetdrivers/gpu/drm/amd/amdgpu/gfx_v12_0.c+9 -160 replies
30/42drm/amdgpu/gfx11: unmap the queue via MES on reset for MMIO pathdrivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+8 -00 replies
31/42drm/amdgpu/gfx12: unmap the queue via MES on reset for MMIO pathdrivers/gpu/drm/amd/amdgpu/gfx_v12_0.c+8 -00 replies
32/42drm/amdgpu: store whether to use MMIO or MES for resetdrivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c+12 -40 replies
33/42drm/amdgpu: Use a common KGQ and KCQ reset helper for gfx11/12drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 more+41 -900 replies
34/42drm/amdkfd: split out mes queue reset sequence into standalone functiondrivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+31 -171 reply
35/42drm/amdkfd: plumb a helper to reset a KFD user queuedrivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 more+66 -11 reply
36/42drm/amdgpu/userq: add MES userq reset helperdrivers/gpu/drm/amd/amdgpu/mes_userqueue.c drivers/gpu/drm/amd/amdgpu/mes_userqueue.h+47 -10 replies
37/42drm/amdgpu/gfx: add a common helper to handle MES compute resetsdrivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +3 more+160 -12 replies
38/42drm/amdgpu: use a single entry point for mes compute resetdrivers/gpu/drm/amd/amdgpu/amdgpu_userq.c drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2 more+22 -680 replies
39/42drm/amdgpu/mes11: enable compute MMIO pipe resetdrivers/gpu/drm/amd/amdgpu/mes_v11_0.c+0 -30 replies
40/42drm/amdgpu/mes12: enable compute MMIO pipe resetdrivers/gpu/drm/amd/amdgpu/mes_v12_0.c+0 -30 replies
41/42drm/amdkfd: Update queue reset support on KFD topologydrivers/gpu/drm/amd/amdkfd/kfd_topology.c+2 -10 replies
42/42drm/amdgpu: Expand MES queue/pipe reset supportdrivers/gpu/drm/amd/amdgpu/amdgpu_mes.c+5 -10 replies

Reviews trailers per patch

7 of 42 patches have a Reviewed-by or Acked-by.

PatchMichael ChenJesse ZhangAmber LinShaoyun.liu
1/42R-b
2/42R-b
3/42
4/42
5/42
6/42
7/42
8/42
9/42
10/42
11/42R-b
12/42R-b
13/42
14/42
15/42
16/42
17/42
18/42
19/42
20/42
21/42
22/42
23/42
24/42
25/42
26/42R-b
27/42
28/42
29/42
30/42
31/42
32/42
33/42
34/42R-b
35/42R-b
36/42
37/42
38/42
39/42
40/42
41/42
42/42

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 v1 thread

Cover letter [PATCH 00/42] Enable pipe reset for compute

There are certain corner cases where a queue reset is not able to recover a hung queue. A pipe reset can recover some of those cases, however, when the pipe is reset all queues on that pipe are reset. This requires coordination across all components using compute queues. There is quite a bit of prep work in this series, some of which I sent out previously. Another prerequisite for this was reworking the userq reset path. It should be more straight-forward now. The final patch also needs to be updated once the new MES firmware is relased so we can check the proper firmware versions. Using older MES firmware may fail and end up in an adapter reset in some cases where the pipe reset would have worked so it should be comparable to the current behavior.

Alex Deucher (34):
drm/amdkfd: always resume_all after suspend_all drm/amdgpu: don't reemit if there is nothing to reemit drm/amdgpu: track guilty fence for queue reset drm/amdgpu/fence: add helper to extract the guilty fence drm/amdgpu: amdgpu_ring_set_fence_errors_and_reemit() handle NULL
fence
drm/amdgpu/vcn: handle pipe reset more gracefully drm/amdgpu/sdma: handle pipe reset more gracefully drm/amdgpu/mes12: use proper grbm_select function drm/amdgpu/gfx11: only need to remap KCQs when reset via MMIO drm/amdgpu/gfx12: only need to remap KCQs when reset via MMIO drm/amdgpu/mes11: move pipe reset to mes use_mmio patch drm/amdgpu/mes12: move pipe reset to mes use_mmio patch drm/amdgpu/mes: add userq reset helper
drm/amdgpu/mes: add a MMIO queue reset helper drm/amdgpu/userq: split the queue reset from adapter reset drm/amdgpu/userq: add per queue reset callback drm/amdgpu/userq: add mes userq reset callback drm/amdgpu/userq: switch to per queue reset drm/amdgpu/userq: drop detect_and_reset callback drm/amdkfd: rework MES queue reset sequence drm/amdgpu/gfx: add a helper for MQD restore drm/amdgpu/gfx11: use the new MQD helper for queue reset drm/amdgpu/gfx12: use the new MQD helper for queue reset drm/amdgpu/gfx11: unmap the queue via MES on reset for MMIO path drm/amdgpu/gfx12: unmap the queue via MES on reset for MMIO path drm/amdgpu: store whether to use MMIO or MES for reset drm/amdgpu: Use a common KGQ and KCQ reset helper for gfx11/12 drm/amdkfd: split out mes queue reset sequence into standalone
function
drm/amdkfd: plumb a helper to reset a KFD user queue drm/amdgpu/userq: add MES userq reset helper drm/amdgpu/gfx: add a common helper to handle MES compute resets drm/amdgpu: use a single entry point for mes compute reset drm/amdgpu/mes11: enable compute MMIO pipe reset drm/amdgpu/mes12: enable compute MMIO pipe reset

Amber Lin (3):
drm/amdgpu: Allocate enough space for hpd info on gfx11 drm/amdkfd: Update queue reset support on KFD topology drm/amdgpu: Expand MES queue/pipe reset support

Jesse Zhang (4):
drm/amdgpu/mes_v12_0: use mes schedule pipe for legacy queues on
unified MES
drm/amdgpu/mes_v12_1: use mes schedule pipe for legacy queues on
unified MES
drm/amdgpu/gfx11: Refactor compute pipe reset and add HQD cleanup drm/amdgpu/gfx12: Refactor compute pipe reset and add HQD cleanup

Shaoyun Liu (1):
drm/amd/amdgpu/include : update mes api header v11/v12

 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c    |  14 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |  54 +++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       | 193 +++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h       |  16 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c       |  67 ++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h       |  14 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h      |   3 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c      |  19 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c     |  84 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h     |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c       |  64 +++--
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c        | 264 +-----------------
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c        | 216 +-------------
 drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c        |   2 +
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c    | 111 ++++----
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.h    |   9 +
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        | 250 ++++++++++++++++-
 drivers/gpu/drm/amd/amdgpu/mes_v12_0.c        | 263 +++++++++++++++--
 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c        |  22 +-
 drivers/gpu/drm/amd/amdkfd/kfd_device.c       |  24 ++
 .../drm/amd/amdkfd/kfd_device_queue_manager.c | 135 ++++-----
 .../drm/amd/amdkfd/kfd_device_queue_manager.h |   2 +
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c     |   3 +-
 drivers/gpu/drm/amd/include/mes_v11_api_def.h |   5 +-
 drivers/gpu/drm/amd/include/mes_v12_api_def.h |   5 +-
 26 files changed, 1150 insertions(+), 708 deletions(-)
Signature · 1 line
2.54.0