Skip to contentSkip to conversation

drm/amdgpu/gfx12: enable the GFX pipe reset with new enough CP firmware

PATCH In review Jesse Zhang 2 participants 3 messages Nov 11

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu/gfx12: enable the GFX pipe reset with new enough CP firmware

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.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +5 -2
index df2fb09bbcd8..6c48451ef8eb 100644
@@ -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:
Signature · 1 line
2.50.1
#1 lore raw

PATCH 2/2 drm/amdgpu/gfx11: enable the GFX pipe reset with new enough CP firmware

Resetting a GFX pipe needs support from the CP firmware. Advertise AMDGPU_RESET_TYPE_PER_PIPE for GFX on GC 11.0.0/2/3, on top of the per queue reset, when the firmware is at least PFP 2790, ME 2600 and MEC 2850. With older firmware only the per queue reset stays available.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +5 -2
index 5d068a9d9c72..ea74defe7fea 100644
@@ -1925,8 +1925,11 @@ static int gfx_v11_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 >= 2790 &&
+			    adev->gfx.me_fw_version >= 2600 &&
+			    adev->gfx.mec_fw_version >= 2850)
+				adev->gfx.gfx_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE;
 		}
 		break;
 	default:
Signature · 1 line
2.50.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/amdgpu/gfx11: enable the GFX pipe reset with new enough CP firmware

Series is:

Quoted 32 lines · Jesse Zhang

Resetting a GFX pipe needs support from the CP firmware. Advertise AMDGPU_RESET_TYPE_PER_PIPE for GFX on GC 11.0.0/2/3, on top of the per queue reset, when the firmware is at least PFP 2790, ME 2600 and MEC 2850. With older firmware only the per queue reset stays available.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +5 -3
index 5d068a9d9c72..ea74defe7fea 100644
@@ -1925,8 +1925,11 @@ static int gfx_v11_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 >= 2790 &&
+                           adev->gfx.me_fw_version >= 2600 &&
+                           adev->gfx.mec_fw_version >= 2850)
+                               adev->gfx.gfx_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE;
                }
                break;
        default:
--

2.50.1