From 6fc4cdafeba4517b94202ff292f05fdd90e52b2e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 16 Jan 2012 21:34:43 +0000 Subject: [PATCH] sna: Correct assertion for a partial read buffer The batch may legitimately be submitted prior to the attachment of the read buffer, if, for example, we need to switch rings. Therefore update the assertion to only check that the bo remains in existence via either a reference from the exec or from the user Signed-off-by: Chris Wilson --- src/sna/kgem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 9169dd74..f79f6603 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1224,7 +1224,7 @@ static void kgem_finish_partials(struct kgem *kgem) list_for_each_entry_safe(bo, next, &kgem->partial, base.list) { if (!bo->write) { - assert(bo->base.exec); + assert(bo->base.exec || bo->base.refcnt > 1); goto decouple; }