From a5a92f3967a5abb42d488cdf912a8f3c52280e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Thu, 21 Dec 2017 13:27:00 +0100 Subject: [PATCH] drm/amdgpu: fix dw estimation v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the absolute worse case we need 2 entries for fixing up the huge pages. v2: take shadow pages into account as well Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index af7dceb7131e..634ff6e9b7f8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1206,7 +1206,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, ndw = 64; /* one PDE write for each huge page */ - ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 6; + ndw += ((nptes >> adev->vm_manager.block_size) + 2) * 12; if (pages_addr) { /* copy commands needed */ -- 2.11.0