summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/kgem.c8
-rw-r--r--src/sna/kgem.h2
2 files changed, 5 insertions, 5 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);
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 9e6db0f2..6cf877cf 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -104,7 +104,7 @@ struct kgem_request {
struct list list;
struct kgem_bo *bo;
struct list buffers;
- int ring;
+ unsigned ring;
};
enum {