From: Christian König Date: Fri, 2 Feb 2018 20:05:40 +0000 (+0100) Subject: drm/amdgpu: clear the shadow fence as well X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e61736daa9b2890c895b9e3e56ee639f36de83b7;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: clear the shadow fence as well It also needs to be initialized. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index b43098f02a40..18ce47608bf1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -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: