[PATCH v2] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.3.2/10.3.4/10.3.5 GPUs
Alex Deucher
alexdeucher at gmail.com
Wed Jan 8 17:38:07 UTC 2025
On Sat, Jan 4, 2025 at 3:52 AM Srinivasan Shanmugam
<srinivasan.shanmugam at amd.com> wrote:
>
> Enable the cleaner shader for GFX10.3.2/10.3.4/10.3.5 GPUs to provide
> data isolation between GPU workloads. The cleaner shader is responsible
> for clearing the Local Data Store (LDS), Vector General Purpose
> Registers (VGPRs), and Scalar General Purpose Registers (SGPRs), which
> helps prevent data leakage and ensures accurate computation results.
>
> This update extends cleaner shader support to GFX10.3.2/10.3.4/10.3.5
> GPUs, previously available for GFX10.3.0. It enhances security by
> clearing GPU memory between processes and maintains a consistent GPU
> state across KGD and KFD workloads.
Are the minimum firmware versions the same for these chips as well?
If not, we'll need to add firmware version checks for them as well.
If they are the same, then the patch is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Alex
>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
> ---
> v2: Updated commit message
>
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 88393c2c08e4..5ba263fe5512 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -4740,6 +4740,9 @@ static int gfx_v10_0_sw_init(struct amdgpu_ip_block *ip_block)
> }
> switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
> case IP_VERSION(10, 3, 0):
> + case IP_VERSION(10, 3, 2):
> + case IP_VERSION(10, 3, 4):
> + case IP_VERSION(10, 3, 5):
> adev->gfx.cleaner_shader_ptr = gfx_10_3_0_cleaner_shader_hex;
> adev->gfx.cleaner_shader_size = sizeof(gfx_10_3_0_cleaner_shader_hex);
> if (adev->gfx.me_fw_version >= 64 &&
> --
> 2.34.1
>
More information about the amd-gfx
mailing list