Explorar o código

drm/amdgpu: fix amdgpu_vm_bo_map

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>
Christian König %!s(int64=10) %!d(string=hai) anos
pai
achega
7e9fca0baa
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

+ 2 - 0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

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