From: Christian König Date: Fri, 6 Mar 2020 19:36:43 +0000 (-0500) Subject: drm/amdgpu: also add the TMZ flag to GART X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bffc8c5caaa97d6791aef965b618d71faac07098;p=linux.git drm/amdgpu: also add the TMZ flag to GART This is necessary for TMZ handling during buffer moves and scanout. 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 0116c4afe1da5..a3c103b4b0a28 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1028,6 +1028,9 @@ int amdgpu_ttm_gart_bind(struct amdgpu_device *adev, struct amdgpu_ttm_tt *gtt = (void *)ttm; int r; + if (amdgpu_bo_encrypted(abo)) + flags |= AMDGPU_PTE_TMZ; + if (abo->flags & AMDGPU_GEM_CREATE_CP_MQD_GFX9) { uint64_t page_idx = 1;