On 2017-08-10 10:50 AM, Christian König wrote: > @@ -1185,9 +1185,31 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev, > { > int r; > > - r = amdgpu_vm_update_level(adev, vm, &vm->root, 0); > - if (r) > - amdgpu_vm_invalidate_level(&vm->root); > + spin_lock(&vm->status_lock); > + while (!list_empty(&vm->relocated)) { > + struct amdgpu_vm_bo_base *bo_base, *parent; > + struct amdgpu_vm_pt *pt; > + struct amdgpu_bo *bo; > + > + bo_base = list_first_entry(&vm->relocated, > + struct amdgpu_vm_bo_base, > + vm_status); > + spin_unlock(&vm->status_lock); > + > + bo = bo_base->bo->parent; For the root page directory I think parent bo->parent will be NULL. Can the root page directory be relocated. If yes, this needs to be handled as a special case here. Regards, Felix > + parent = list_first_entry(&bo->va, struct amdgpu_vm_bo_base, > + bo_list); > + pt = container_of(parent, struct amdgpu_vm_pt, base); > + > + r = amdgpu_vm_update_level(adev, vm, pt); > + if (r) { > + amdgpu_vm_invalidate_level(vm, &vm->root); > + break; > + } > + > + spin_lock(&vm->status_lock); > + } > + spin_unlock(&vm->status_lock); > > if (vm->use_cpu_for_update) { > /* Flush HDP */