Report AMDGPU_RESET_TYPE_IP_BLOCK_SOFT_RESET for the gfx rings with MES,
which the reset uses to map the kernel gfx queue again. Not on SR-IOV
VFs.
The kernel gfx queue and gfx user queue resets then fall back to a soft
reset of the gfx engine before a full reset. The IP block soft reset of
gfx11 only resets the gfx engine then; the whole IP block soft_reset()
isn't used.
Only on GC 11.5.1 (Strix Halo) and 11.5.3 (Krackan) for now, where the
reset was verified to leave running compute work alone. On GC 11.0.0
(Navi31) SOFT_RESET_GFX resets the compute wave crawlers of SPI while
the event/wave counters of CPC keep their value, and compute work that
was running stops making progress. On GC 11.0.1 and 11.0.4 (Phoenix) PFP
doesn't go idle after the reset. The other gfx11 IPs weren't tested.
v4: Not limited to the RS64 firmware anymore, the reset restarts the F32
PFP and ME of the APUs too (Timur). The soft_reset_engine() callback
is set by the patch that adds it. No async gfx ring check: they are
always used now.
v6: Only enable it on GC 11.5.1 and 11.5.3.
Reviewed-by: Timur Kristóf <[email protected]>
Signed-off-by: Jesse Zhang <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 824d7914bece..a878aaee1b74 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -1965,6 +1965,13 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block
*ip_block)
break;
}
+ /* Only on the GC versions it was verified on */
+ if ((amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 1) ||
+ amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 3)) &&
+ !amdgpu_sriov_vf(adev) && adev->enable_mes &&
+ !adev->debug_disable_ip_block_soft_reset)
+ adev->gfx.gfx_supported_reset |=
AMDGPU_RESET_TYPE_IP_BLOCK_SOFT_RESET;
+
if (!adev->enable_mes_kiq) {
r = amdgpu_gfx_kiq_init(adev, GFX11_MEC_HPD_SIZE, 0);
if (r) {
--
2.50.1