DBG(("%s: moving %d to flushing\n",
__FUNCTION__, bo->handle));
list_add(&bo->request, &kgem->flushing);
- bo->rq = (void *)kgem;
+ bo->rq = MAKE_REQUEST(kgem, RQ_RING(bo->rq));
continue;
}
DBG(("%s: ring=%d idle (handle=%d)\n",
__FUNCTION__, ring, rq->bo->handle));
- if (kgem_retire__requests_ring(kgem, ring))
- kgem_retire__buffers(kgem);
+ kgem_retire__requests_ring(kgem, ring);
+ kgem_retire__buffers(kgem);
assert(list_is_empty(&kgem->requests[ring]));
return true;
(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;
list_move(&bo->base.list,