Skip to content

drm/amdgpu/gfx7: Use GFX IP block soft reset on GFX7 (v2)

Timur Kristóf amd-gfx 1 version Applied

Status from this message: Applied the series. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 1 replyApplied

Changes from v1 to v2 from the cover letter

* Add more explanation to various patches
* Address feedback from the review of the v1

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/9drm/amdgpu/gfx7: Make amdgpu_gfx_mqd_sw_init() usable on GFX7drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c+2 -20 replies
2/9drm/amdgpu/gfx7: Refactor MQD initialization and finalizationdrivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+51 -550 replies
3/9drm/amdgpu/gfx7: Return error code when compute ring tests faildrivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+4 -20 replies
4/9drm/amdgpu/gfx7: Return error code when failing to start GFX ringdrivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+4 -10 replies
5/9drm/amdgpu/gfx7: Fixup emitting SWITCH_BUFFER packetsdrivers/gpu/drm/amd/amdgpu/amdgpu_vm.c drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+16 -230 replies
6/9drm/amdgpu/gfx7: Clean up gfx ring during resetdrivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+6 -10 replies
7/9drm/amdgpu/gfx7: Use COND_EXECdrivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+22 -00 replies
8/9drm/amdgpu/gfx7: Fixup IP block soft resetdrivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+76 -720 replies
9/9drm/amdgpu/gfx7: Enable IP block soft reset as a GPU recovery methoddrivers/gpu/drm/amd/amdgpu/gfx_v7_0.c+5 -00 replies

Reviews trailers per patch

5 of 9 patches have a Reviewed-by or Acked-by.

PatchTvrtko Ursulin
1/9R-b
2/9R-b
3/9
4/9
5/9
6/9
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] drm/amdgpu/gfx7: Use GFX IP block soft reset on GFX7 (v2)

GFX IP block soft reset has been implemented as recovery method so that we can have a way to reset just the GFX block without resetting the whole GPU or losing the contents of VRAM.

Fix up various things in the GFX7 code to prepare it to work with IP block soft reset. The main challenge was fixing up the MQD/HQD handling to ensure that it doesn't hang after the soft reset. There are also other minor fixups.

Rework the pre-existing GFX7 soft reset implementation like the reworked version on GFX8 to make it more robust. In practice, this means that it will now reset everything in the GFX IP block (instead of taking a guess at which parts need to be reset) to make it consistent, and it now also handles clock and power gating to make sure not to degrade GPU functionality after a GFX IP block soft reset.

This improves current user experience on all GFX7 chips:

On Kaveri and Kabini there is currently no working GPU recovery method so those chips currently require the user to manually reset the computer when there was a hang.

On Hawaii and Bonaire, the current GPU recovery method always clears the contents of VRAM, which means that a buggy (hanging) app can crash the whole graphical session, which is less than ideal.

Using GFX IP block soft reset means that we can now have a working recovery on GFX7 APUs and we can also move on from GFX hangs on dGPUs without crashing the whole system.

Tested on the following chips:

Bonaire (Radeon HD 7790)
Hawaii (Radeon R9 390X)
Kaveri (A10-7850K)

Changes from v1 to v2:

* Add more explanation to various patches
* Address feedback from the review of the v1

Timur Kristóf (9):
drm/amdgpu/gfx7: Make amdgpu_gfx_mqd_sw_init() usable on GFX7 drm/amdgpu/gfx7: Refactor MQD initialization and finalization drm/amdgpu/gfx7: Return error code when compute ring tests fail drm/amdgpu/gfx7: Return error code when failing to start GFX ring drm/amdgpu/gfx7: Fixup emitting SWITCH_BUFFER packets drm/amdgpu/gfx7: Clean up gfx ring during reset drm/amdgpu/gfx7: Use COND_EXEC
drm/amdgpu/gfx7: Fixup IP block soft reset drm/amdgpu/gfx7: Enable IP block soft reset as a GPU recovery method

 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |   7 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c   | 331 +++++++++++++-----------
 3 files changed, 186 insertions(+), 156 deletions(-)
Signature · 1 line
2.55.0