From e952968ed7c6f1ec90752f10a5fb24ae2faa57f7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 14 Oct 2013 23:16:48 +0100 Subject: sna: Assert that the mode/ring are set when marking active bo As we use the current ring to encode upon the bo relocs, we need that ring to be properly setup prior to performing relocations. References: https://bugs.freedesktop.org/show_bug.cgi?id=70461 Signed-off-by: Chris Wilson --- src/sna/kgem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index dbcd1428..9eb0fa59 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -4880,6 +4880,7 @@ uint32_t kgem_add_reloc(struct kgem *kgem, assert(index < ARRAY_SIZE(kgem->reloc)); kgem->reloc[index].offset = pos * sizeof(kgem->batch[0]); if (bo) { + assert(kgem->mode != KGEM_NONE); assert(bo->refcnt); while (bo->proxy) { DBG(("%s: adding proxy [delta=%d] for handle=%d\n", -- cgit v1.2.3