Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad9ac437 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau: add some debug output if nouveau_mm busy at destroy time



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent e41f26e7
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -158,11 +158,18 @@ int
nouveau_mm_fini(struct nouveau_mm **prmm)
{
	struct nouveau_mm *rmm = *prmm;
	struct nouveau_mm_node *heap =
	struct nouveau_mm_node *node, *heap =
		list_first_entry(&rmm->nodes, struct nouveau_mm_node, nl_entry);

	if (!list_is_singular(&rmm->nodes))
	if (!list_is_singular(&rmm->nodes)) {
		printk(KERN_ERR "nouveau_mm not empty at destroy time!\n");
		list_for_each_entry(node, &rmm->nodes, nl_entry) {
			printk(KERN_ERR "0x%02x: 0x%08x 0x%08x\n",
			       node->type, node->offset, node->length);
		}
		WARN_ON(1);
		return -EBUSY;
	}

	kfree(heap);
	kfree(rmm);
+1 −1
Original line number Diff line number Diff line
@@ -396,8 +396,8 @@ nouveau_vm_del(struct nouveau_vm *vm)
	list_for_each_entry_safe(vpgd, tmp, &vm->pgd_list, head) {
		nouveau_vm_unlink(vm, vpgd->obj);
	}
	WARN_ON(nouveau_mm_fini(&vm->mm) != 0);

	nouveau_mm_fini(&vm->mm);
	kfree(vm->pgt);
	kfree(vm);
}