drm/amdgpu: clear the shadow fence as well
authorChristian König <christian.koenig@amd.com>
Fri, 2 Feb 2018 20:05:40 +0000 (21:05 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:19:20 +0000 (14:19 -0500)
It also needs to be initialized.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index b43098f02a40d8ccfc8fb12a735b72a8f855365e..18ce47608bf1fe8317eff4f2e67fae51a117a02b 100644 (file)
@@ -336,6 +336,11 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 
        amdgpu_bo_fence(bo, fence, true);
        dma_fence_put(fence);
+
+       if (bo->shadow)
+               return amdgpu_vm_clear_bo(adev, vm, bo->shadow,
+                                         level, pte_support_ats);
+
        return 0;
 
 error_free: