drm/amdgpu: also add the TMZ flag to GART
authorChristian König <christian.koenig@amd.com>
Fri, 6 Mar 2020 19:36:43 +0000 (14:36 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2020 20:20:29 +0000 (16:20 -0400)
This is necessary for TMZ handling during buffer moves and scanout.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 0116c4a..a3c103b 100644 (file)
@@ -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;