xf86-video-intel: src/sna/kgem.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Oct 29 19:01:34 CET 2013


 src/sna/kgem.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit eddd80c44dbb21769cbd100b8cfb0f38d1606e86
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Oct 29 18:00:49 2013 +0000

    sna: Remove an overzealous assert
    
    Testing with a slow gen2 triggers this harmless assertion, so drop it.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 772ddbd..3b403ca 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -2452,14 +2452,12 @@ static void kgem_finish_buffers(struct kgem *kgem)
 			    (kgem->has_llc || bo->mmapped == MMAPPED_GTT || bo->base.snoop)) {
 				DBG(("%s: retaining upload buffer (%d/%d)\n",
 				     __FUNCTION__, bo->used, bytes(&bo->base)));
-				assert(bo->base.rq);
-				assert(used >= bo->used);
 				bo->used = used;
 				if (bo->base.refcnt == 1) {
 					list_move(&bo->base.list,
 						  &kgem->active_buffers);
+					kgem->need_retire = true;
 				}
-				kgem->need_retire = true;
 				continue;
 			}
 			DBG(("%s: discarding mmapped buffer, used=%d, map type=%d\n",
@@ -2467,7 +2465,7 @@ static void kgem_finish_buffers(struct kgem *kgem)
 			goto decouple;
 		}
 
-		if (!bo->used) {
+		if (!bo->used || !bo->base.exec) {
 			/* Unless we replace the handle in the execbuffer,
 			 * then this bo will become active. So decouple it
 			 * from the buffer list and track it in the normal


More information about the xorg-commit mailing list