]> Git Repo - linux.git/commit
drm/amdgpu/gfx11: Add cleaner shader for GFX11.0.3
authorSrinivasan Shanmugam <[email protected]>
Wed, 30 Oct 2024 09:11:41 +0000 (14:41 +0530)
committerAlex Deucher <[email protected]>
Tue, 5 Nov 2024 15:33:56 +0000 (10:33 -0500)
commit949d817c78cc6416d6e22f3f72a6960cd7412755
treecf9b43694cf9c41bb91d8b6ab1ce527ea0bfa08f
parent6bfe777e9267ee6d1c4712b52bb5d32e59508a3d
drm/amdgpu/gfx11: Add cleaner shader for GFX11.0.3

This commit adds the cleaner shader microcode for GFX11.0.3 GPUs. The
cleaner shader is a piece of GPU code that is used to clear or
initialize certain GPU resources, such as Local Data Share (LDS), Vector
General Purpose Registers (VGPRs), and Scalar General Purpose Registers
(SGPRs).

Clearing these resources is important for ensuring data isolation
between different workloads running on the GPU. Without the cleaner
shader, residual data from a previous workload could potentially be
accessed by a subsequent workload, leading to data leaks and incorrect
computation results.

The cleaner shader microcode is represented as an array of 32-bit words
(`gfx_11_0_3_cleaner_shader_hex`). This array is the binary
representation of the cleaner shader code, which is written in a
low-level GPU instruction set.

When the cleaner shader feature is enabled, the AMDGPU driver loads this
array into a specific location in the GPU memory. The GPU then reads
this memory location to fetch and execute the cleaner shader
instructions.

The cleaner shader is executed automatically by the GPU at the end of
each workload, before the next workload starts. This ensures that all
GPU resources are in a clean state before the start of each workload.

This addition is part of the cleaner shader feature implementation. The
cleaner shader feature helps resource utilization by cleaning up GPU
resources after they are used. It also enhances security and reliability
by preventing data leaks between workloads.

Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
Suggested-by: Alex Deucher <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3_cleaner_shader.asm [new file with mode: 0644]
drivers/gpu/drm/amd/amdgpu/gfx_v11_0_cleaner_shader.h [new file with mode: 0644]
This page took 0.055932 seconds and 4 git commands to generate.