Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/gfx11: Add Cleaner Shader Support for GFX11.5.4

The Cleaner Shader is responsible for clearing LDS, VGPRs and SGPRs
between GPU workloads to enforce process isolation and avoid data
leakage.

The cleaner shader clears per-wave GPU state (LDS, VGPRs and SGPRs)
between workloads, improving process isolation and preventing stale data
from being observed by subsequent tasks.

This reuses the existing cleaner shader used on GFX11.0.3 and enables it
for GFX11.5.4 GPUs when firmware requirements are met.

Cc: Muhammad Adam <muhammad.adam@amd.com>
Cc: Mario Sopena-Novales <mario.novales@amd.com>
Cc: Tom Wu <Tom.Wu@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>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Srinivasan Shanmugam and committed by
Alex Deucher
e4b1715a 2fb4883b

+14
+14
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
··· 1722 1722 } 1723 1723 } 1724 1724 break; 1725 + case IP_VERSION(11, 5, 4): 1726 + adev->gfx.cleaner_shader_ptr = gfx_11_0_3_cleaner_shader_hex; 1727 + adev->gfx.cleaner_shader_size = sizeof(gfx_11_0_3_cleaner_shader_hex); 1728 + if (adev->gfx.me_fw_version >= 4 && 1729 + adev->gfx.pfp_fw_version >= 7 && 1730 + adev->gfx.mec_fw_version >= 5) { 1731 + adev->gfx.enable_cleaner_shader = true; 1732 + r = amdgpu_gfx_cleaner_shader_sw_init(adev, adev->gfx.cleaner_shader_size); 1733 + if (r) { 1734 + adev->gfx.enable_cleaner_shader = false; 1735 + dev_err(adev->dev, "Failed to initialize cleaner shader\n"); 1736 + } 1737 + } 1738 + break; 1725 1739 default: 1726 1740 adev->gfx.enable_cleaner_shader = false; 1727 1741 break;