IP block soft reset is a way to reset just one IP block
in a GPU without resetting the whole GPU or losing the
contents of VRAM. Currently this is implemented for various
IP blocks, but actually only used on Carrizo and Stoney
as part of the ASIC reset code, and it fails.
Let's rework that.
Delete the defunct code from the ASIC reset code path.
Also delete check_soft_reset() and pre/post_soft_reset()
which were quite useless and redundant (see the commit
messages for details).
Add IP block soft reset as a GPU recovery method instead.
This works similarly to ring reset, but will affect all
rings that belong to the IP block. For example, a GFX
IP block soft reset will affect all graphics and compute
rings. It is called when a job is timed out. Attempt
to minimize the effect on non-guilty jobs, then back
up the contents of all affected rings, perform the HW
specific soft reset, then restore the rings.
For this, I am also including some patches from Alex
which were written for pipe reset and solve some
problems also for IP block soft reset.
Finally, let's fix up the soft reset implementation
on GFX8 to make sure it works on every GFX8 chip.
Specifically, fix an issue with compute rings hanging
after the reset, and fix an issue with increased power
consumption after the reset, among others.
With those issues gone, enable the new GPU recovery
method on GFX8.
Tested with the "hard_reset_cp_wait" test case from the
Hang Test Suite created by Natalie Vock and Konstantin Seurer.
This Vulkan testcase waits for an event that never occurs,
effectively a WAIT_REG_MEM packet that intentionally hangs.
IP block soft reset can resolve that hang and allow
the rest of the system to move on and keep functioning
without needing a full ASIC reset.
Tested on the following chips:
Polaris 10 (Radeon RX 570)
Polaris 11 (Radeon RX 560)
Polaris 12 (Radeon RX 550)
Fiji (Radeon R9 Nano)
Tonga (Radeon R9 380X)
Carrizo (A8-9600)
Alex Deucher (4):
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 (v2)
drm/amdgpu: amdgpu_ring_set_fence_errors_and_reemit() handle NULL
fence
Timur Kristóf (13):
drm/amdgpu: Clarify name of soft recovery to avoid confusion
drm/amdgpu: Clean up defunct soft reset from ASIC reset code path
drm/amdgpu: Delete GMC 8 soft reset
drm/amdgpu: Delete soft reset code from legacy display driver
drm/amdgpu: Delete check_soft_reset() from amd_ip_funcs
drm/amdgpu: Delete pre/post_soft_reset() from amd_ip_funcs
drm/amdgpu: Add IP block soft reset as a GPU recovery method
drm/amdgpu/gfx8: Stop CP and RLC during reset
drm/amdgpu/gfx8: Return error when testing all rings
drm/amdgpu/gfx8: Support COND_EXEC on compute rings
drm/amdgpu/gfx8: Adjust EDC GPR workaround
drm/amdgpu/gfx8: Fixup IP block soft reset
drm/amdgpu/gfx8: Enable IP block soft reset as a GPU recovery method
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 179 +-------------
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 54 ++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 -
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c | 154 ++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h | 5 +
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 13 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 171 +++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 8 +
drivers/gpu/drm/amd/amdgpu/cik.c | 7 -
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 66 ------
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 57 -----
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 57 -----
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 36 +--
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 224 +++++-------------
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 125 ----------
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 3 -
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c | 3 -
drivers/gpu/drm/amd/amdgpu/nv.c | 6 -
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 62 -----
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 18 --
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 18 --
drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c | 18 --
drivers/gpu/drm/amd/amdgpu/si.c | 7 -
drivers/gpu/drm/amd/amdgpu/soc15.c | 9 -
drivers/gpu/drm/amd/amdgpu/soc21.c | 12 -
drivers/gpu/drm/amd/amdgpu/soc24.c | 11 -
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 10 -
drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 40 ----
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 45 ----
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 69 ------
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 3 -
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c | 3 -
drivers/gpu/drm/amd/amdgpu/vi.c | 22 --
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 -
drivers/gpu/drm/amd/include/amd_shared.h | 3 -
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
39 files changed, 487 insertions(+), 1058 deletions(-)
--
2.54.0