diff options
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r-- | src/sna/kgem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index b80fde73..ac4da4b8 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3275,18 +3275,18 @@ bool __kgem_ring_is_idle(struct kgem *kgem, int ring) bool __kgem_retire_requests_upto(struct kgem *kgem, struct kgem_bo *bo) { - struct kgem_request *rq = bo->rq, *tmp; - struct list *requests = &kgem->requests[RQ_RING(rq) == KGEM_BLT]; + struct kgem_request * const rq = RQ(bo->rq), *tmp; + struct list *requests = &kgem->requests[rq->ring]; - DBG(("%s(handle=%d)\n", __FUNCTION__, bo->handle)); + DBG(("%s(handle=%d, ring=%d)\n", __FUNCTION__, bo->handle, rq->ring)); - rq = RQ(rq); assert(rq != &kgem->static_request); if (rq == (struct kgem_request *)kgem) { __kgem_bo_clear_busy(bo); return false; } + assert(rq->ring < ARRAY_SIZE(kgem->requests)); do { tmp = list_first_entry(requests, struct kgem_request, list); assert(tmp->ring == rq->ring); |