All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: fix adding all VAs to the freed list on remove
@ 2015-06-26  8:41 Christian König
  2015-06-26  9:36 ` Michel Dänzer
  0 siblings, 1 reply; 2+ messages in thread
From: Christian König @ 2015-06-26  8:41 UTC (permalink / raw)
  To: alexdeucher; +Cc: michel, dri-devel

From: Christian König <christian.koenig@amd.com>

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

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/radeon/radeon_vm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index 3662157..53d57d9 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -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 {
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/radeon: fix adding all VAs to the freed list on remove
  2015-06-26  8:41 [PATCH] drm/radeon: fix adding all VAs to the freed list on remove Christian König
@ 2015-06-26  9:36 ` Michel Dänzer
  0 siblings, 0 replies; 2+ messages in thread
From: Michel Dänzer @ 2015-06-26  9:36 UTC (permalink / raw)
  To: Christian König; +Cc: dri-devel

On 26.06.2015 17:41, Christian König wrote:
> From: Christian König <christian.koenig@amd.com>
> 
> We only should do so when the BO_VA was actually mapped.
> Otherwise we get a nice error message on the next CS.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>

Tested-by: Michel Dänzer <michel.daenzer@amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-26  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26  8:41 [PATCH] drm/radeon: fix adding all VAs to the freed list on remove Christian König
2015-06-26  9:36 ` Michel Dänzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.