Skip to contentSkip to conversation

drm/radeon: fix adding all VAs to the freed list on remove

PATCH In review Christian König 2 participants 2 messages Jun 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: fix adding all VAs to the freed list on remove

From: Christian König <[email protected]>

We only should do so when the BO_VA was actually mapped. Otherwise we get a nice error message on the next CS.

---
 drivers/gpu/drm/radeon/radeon_vm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_vm.c +2 -1
index 3662157..53d57d9 100644
@@ -1129,7 +1129,8 @@ void radeon_vm_bo_rmv(struct radeon_device *rdev,
 		interval_tree_remove(&bo_va->it, &vm->va);
 
 	spin_lock(&vm->status_lock);
-	if (list_empty(&bo_va->vm_status)) {
+	if (list_empty(&bo_va->vm_status) &&
+	    (bo_va->it.start || bo_va->it.last)) {
 		bo_va->bo = radeon_bo_ref(bo_va->bo);
 		list_add(&bo_va->vm_status, &vm->freed);
 	} else {
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Christian König

From: Christian König <[email protected]>

We only should do so when the BO_VA was actually mapped. Otherwise we get a nice error message on the next CS.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel