Skip to content

Commit c1b6b8c

Browse files
srishanmalexdeucher
authored andcommitted
drm/amdgpu/gfx11: Add Cleaner Shader Support for GFX11.0.1/11.0.4 GPUs
Enable the cleaner shader for additional GFX11.0.1/11.0.4 series GPUs to ensure data isolation among GPU tasks. The cleaner shader is tasked with clearing the Local Data Store (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps avoid data leakage and guarantees the accuracy of computational results. This update extends cleaner shader support to GFX11.0.1/11.0.4 GPUs, previously available for GFX11.0.3. It enhances security by clearing GPU memory between processes and maintains a consistent GPU state across KGD and KFD workloads. Cc: Wasee Alam <wasee.alam@amd.com> Cc: Mario Sopena-Novales <mario.novales@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 0a71ceb)
1 parent f83ec76 commit c1b6b8c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,21 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
16541654
}
16551655
}
16561656
break;
1657+
case IP_VERSION(11, 0, 1):
1658+
case IP_VERSION(11, 0, 4):
1659+
adev->gfx.cleaner_shader_ptr = gfx_11_0_3_cleaner_shader_hex;
1660+
adev->gfx.cleaner_shader_size = sizeof(gfx_11_0_3_cleaner_shader_hex);
1661+
if (adev->gfx.pfp_fw_version >= 102 &&
1662+
adev->gfx.mec_fw_version >= 66 &&
1663+
adev->mes.fw_version[0] >= 128) {
1664+
adev->gfx.enable_cleaner_shader = true;
1665+
r = amdgpu_gfx_cleaner_shader_sw_init(adev, adev->gfx.cleaner_shader_size);
1666+
if (r) {
1667+
adev->gfx.enable_cleaner_shader = false;
1668+
dev_err(adev->dev, "Failed to initialize cleaner shader\n");
1669+
}
1670+
}
1671+
break;
16571672
case IP_VERSION(11, 5, 0):
16581673
case IP_VERSION(11, 5, 1):
16591674
adev->gfx.cleaner_shader_ptr = gfx_11_0_3_cleaner_shader_hex;

0 commit comments

Comments
 (0)