提交 15ba79ad 编写于 作者: B Ben Skeggs

drm/nouveau: shut lockdep up if last vm ref needs to destroy pgd

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 06b75e35
...@@ -369,23 +369,26 @@ nouveau_vm_link(struct nouveau_vm *vm, struct nouveau_gpuobj *pgd) ...@@ -369,23 +369,26 @@ nouveau_vm_link(struct nouveau_vm *vm, struct nouveau_gpuobj *pgd)
} }
static void static void
nouveau_vm_unlink(struct nouveau_vm *vm, struct nouveau_gpuobj *pgd) nouveau_vm_unlink(struct nouveau_vm *vm, struct nouveau_gpuobj *mpgd)
{ {
struct nouveau_vm_pgd *vpgd, *tmp; struct nouveau_vm_pgd *vpgd, *tmp;
struct nouveau_gpuobj *pgd = NULL;
if (!pgd) if (!mpgd)
return; return;
mutex_lock(&vm->mm->mutex); mutex_lock(&vm->mm->mutex);
list_for_each_entry_safe(vpgd, tmp, &vm->pgd_list, head) { list_for_each_entry_safe(vpgd, tmp, &vm->pgd_list, head) {
if (vpgd->obj != pgd) if (vpgd->obj == mpgd) {
continue; pgd = vpgd->obj;
list_del(&vpgd->head);
list_del(&vpgd->head); kfree(vpgd);
nouveau_gpuobj_ref(NULL, &vpgd->obj); break;
kfree(vpgd); }
} }
mutex_unlock(&vm->mm->mutex); mutex_unlock(&vm->mm->mutex);
nouveau_gpuobj_ref(NULL, &pgd);
} }
static void static void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册