drm/amdgpu: Wipe all VRAM on free when RAS is enabled
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 25 Jan 2022 15:51:49 +0000 (10:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jan 2022 20:48:41 +0000 (15:48 -0500)
commitfc6ea4bee130710a77ec16a86d2013e964602503
treec95f7b3143dc34e46e60c9534dada730e543889d
parent7270e8957eb9aacf5914605d04865f3829a14bce
drm/amdgpu: Wipe all VRAM on free when RAS is enabled

On GPUs with RAS, poison can propagate between processes if VRAM is not
cleared when it is freed or allocated. The reason is, that not all write
accesses clear RAS poison. 32-byte writes by the SDMA engine do clear RAS
poison. Clearing memory in the background when it is freed should avoid
major performance impact. KFD has been doing this already for a long time.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c