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>
This commit is contained in:
Chris Wilson 2013-10-14 23:16:48 +01:00
parent 9f009c13be
commit e952968ed7
1 changed files with 1 additions and 0 deletions

View File

@ -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",