From: Christian König Date: Mon, 2 Mar 2020 12:00:07 +0000 (+0100) Subject: drm/amdgpu: stop evicting encrypted BOs to swap X-Git-Tag: v5.8-rc1~194^2~14^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=218c0b7f183a88b3b2678fbca885a750dda2bff3;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: stop evicting encrypted BOs to swap Swapping out encrypted BOs doesn't work because they can't change their physical location without going through a bounce copy. As a workaround disable evicting encrypted BOs to the system domain for now. Signed-off-by: Christian König Reviewed-by: Alex Deucher Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index edb5badb7476f..aa4ea437155e7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1550,6 +1550,9 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo, switch (bo->mem.mem_type) { case TTM_PL_TT: + if (amdgpu_bo_is_amdgpu_bo(bo) && + amdgpu_bo_encrypted(ttm_to_amdgpu_bo(bo))) + return false; return true; case TTM_PL_VRAM: