From f3ede346e40ceed8dd54410d75d20acec9691a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 30 Jan 2016 11:03:50 +0100 Subject: [PATCH] drm/amdgpu: fix amdgpu_vm_bo_split_mapping() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I somehow forgotten to add those during commit. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 10ea070..9aff032 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -818,7 +818,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev, addr += mapping->offset; - if ((gtt == &adev->gart) && (flags == gtt_flags)) + if (!gtt || ((gtt == &adev->gart) && (flags == gtt_flags))) return amdgpu_vm_bo_update_mapping(adev, gtt, gtt_flags, vm, start, mapping->it.last, flags, addr, fence); @@ -834,6 +834,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev, return r; start = last + 1; + addr += max_size; } return 0; -- 1.9.1