drm/amdgpu/gfx9: Implement cleaner shader support for GFX9.4.3 hardware
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Mon, 29 Jul 2024 16:42:02 +0000 (22:12 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Aug 2024 02:07:11 +0000 (22:07 -0400)
commitd4c38154951b2bff6bfa4d5eb56df0bd08703cf9
tree0f468fff38c38b6187d1ea80fa35d606292667f1
parentc2e70d307f4491ff970208a41cce84c95771f340
drm/amdgpu/gfx9: Implement cleaner shader support for GFX9.4.3 hardware

The patch modifies the gfx_v9_4_3_kiq_set_resources function to write
the cleaner shader's memory controller address to the ring buffer. It
also adds a new function, gfx_v9_4_3_ring_emit_cleaner_shader, which
emits the PACKET3_RUN_CLEANER_SHADER packet to the ring buffer.

This patch adds support for the PACKET3_RUN_CLEANER_SHADER packet in the
gfx_v9_4_3 module. This packet is used to emit the cleaner shader, which
is used to clear GPU memory before it's reused, helping to prevent data
leakage between different processes.

Finally, the patch updates the ring function structures to include the
new gfx_v9_4_3_ring_emit_cleaner_shader function. This allows the
cleaner shader to be emitted as part of the ring's operations.

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3_cleaner_shader.h [new file with mode: 0644]