drm/amdgpu: handle PTE MTYPE in amdgpu_vm_bo_split_mapping
authorAlex Xie <AlexBin.Xie@amd.com>
Fri, 3 Mar 2017 21:49:39 +0000 (16:49 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:54:43 +0000 (23:54 -0400)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 338aee7f2aba863570f859a14eb13f1ac10e2719..2d9ec9cac44790fd1fe8bc5034d05592ee410fd2 100644 (file)
@@ -1113,6 +1113,9 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,
        flags &= ~AMDGPU_PTE_EXECUTABLE;
        flags |= mapping->flags & AMDGPU_PTE_EXECUTABLE;
 
+       flags &= ~AMDGPU_PTE_MTYPE_MASK;
+       flags |= (mapping->flags & AMDGPU_PTE_MTYPE_MASK);
+
        trace_amdgpu_vm_bo_update(mapping);
 
        pfn = mapping->offset >> PAGE_SHIFT;