On Thu, Sep 11, 2025 at 11:09 AM Srinivasan Shanmugam
<srinivasan.shanmu...@amd.com> wrote:
>
> Enable the cleaner shader for additional GFX11.5.2/11.5.3 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.a...@amd.com>
> Cc: Mario Sopena-Novales <mario.nova...@amd.com>
> Cc: Christian König <christian.koe...@amd.com>
> Cc: Alex Deucher <alexander.deuc...@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmu...@amd.com>

Acked-by: Alex Deucher <alexander.deuc...@amd.com>

> ---
> v2: updated MES FW version
>
>  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> index 86b3fcab5772..66c47c466532 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> @@ -1653,6 +1653,21 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block 
> *ip_block)
>                         }
>                 }
>                 break;
> +       case IP_VERSION(11, 0, 1):
> +       case IP_VERSION(11, 0, 4):
> +               adev->gfx.cleaner_shader_ptr = gfx_11_0_3_cleaner_shader_hex;
> +               adev->gfx.cleaner_shader_size = 
> sizeof(gfx_11_0_3_cleaner_shader_hex);
> +               if (adev->gfx.pfp_fw_version >= 102 &&
> +                   adev->gfx.mec_fw_version >= 66 &&
> +                   adev->mes.fw_version[0] >= 128) {
> +                       adev->gfx.enable_cleaner_shader = true;
> +                       r = amdgpu_gfx_cleaner_shader_sw_init(adev, 
> adev->gfx.cleaner_shader_size);
> +                       if (r) {
> +                               adev->gfx.enable_cleaner_shader = false;
> +                               dev_err(adev->dev, "Failed to initialize 
> cleaner shader\n");
> +                       }
> +               }
> +               break;
>         case IP_VERSION(11, 5, 0):
>         case IP_VERSION(11, 5, 1):
>                 adev->gfx.cleaner_shader_ptr = gfx_11_0_3_cleaner_shader_hex;
> --
> 2.34.1
>

Reply via email to