drm/amdgpu: fix amdgpu_vm_bo_map
authorChristian König <christian.koenig@amd.com>
Fri, 5 Jun 2015 08:06:04 +0000 (10:06 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Jun 2015 01:42:51 +0000 (21:42 -0400)
We need to reset the bo_va address, otherwise new mappings
wouldn't be updated in the page table.

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

index fd28e890693e17cac5242ae5588553ab24ef3a92..33696ee55349cff09338d766e84ada7df837431c 100644 (file)
@@ -1002,6 +1002,8 @@ int amdgpu_vm_bo_map(struct amdgpu_device *adev,
        list_add(&mapping->list, &bo_va->mappings);
        interval_tree_insert(&mapping->it, &vm->va);
 
+       bo_va->addr = 0;
+
        /* Make sure the page tables are allocated */
        saddr >>= amdgpu_vm_block_size;
        eaddr >>= amdgpu_vm_block_size;