Resetting a GFX pipe needs support from the CP firmware. Advertise AMDGPU_RESET_TYPE_PER_PIPE for GFX on GC 12.0.0/1, on top of the per queue reset, when the firmware is at least PFP 3220, ME 3120 and MEC 3490. With older firmware only the per queue reset stays available.
Signed-off-by: Jesse Zhang <[email protected]> --- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c index df2fb09bbcd8..6c48451ef8eb 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c @@ -1582,8 +1582,11 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block) !adev->debug_disable_gpu_ring_reset) { adev->gfx.compute_supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE; adev->gfx.gfx_supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE; - /* TODO: verify CP warm-reset support before enabling PER_PIPE. */ - /* adev->gfx.gfx_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE; */ + /* Resetting a GFX pipe needs the CP firmware to support it */ + if (adev->gfx.pfp_fw_version >= 3220 && + adev->gfx.me_fw_version >= 3120 && + adev->gfx.mec_fw_version >= 3490) + adev->gfx.gfx_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE; } break; default: -- 2.50.1
