summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-14 23:16:48 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-14 23:18:24 +0100
commite952968ed7c6f1ec90752f10a5fb24ae2faa57f7 (patch)
tree48458a97ad8a4c0ab5985bb93bf70f29ab07758f
parent9f009c13beeb6b156e638975827d06b3cdedb0c6 (diff)
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 <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c1
1 files changed, 1 insertions, 0 deletions
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",