From 9ca0de7a98dde0e29a6e0af019a9db0b052f8bce 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 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. 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..0971a9747a66 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) * 6; if (pages_addr) { /* copy commands needed */ -- 2.11.0