diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-11 15:05:32 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-11 15:05:32 +0100 |
commit | 44a1528c15eec9b3f93651e779013137864d4d2b (patch) | |
tree | 289206c937fcf820c3c36d116c5bc11c39e0ddd6 /src/sna | |
parent | 94d489ae43a2c4d4d9ddc9ce30ff1a9142b77d4a (diff) |
sna: Remove unused cached partials list
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/kgem.c | 20 | ||||
-rw-r--r-- | src/sna/kgem.h | 2 |
2 files changed, 6 insertions, 16 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 4fd4d1f7..bea7aea3 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -712,7 +712,6 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen) list_init(&kgem->batch_partials); list_init(&kgem->active_partials); - list_init(&kgem->cached_partials); list_init(&kgem->requests); list_init(&kgem->flushing); list_init(&kgem->sync_list); @@ -1387,16 +1386,11 @@ static void kgem_partial_buffer_release(struct kgem *kgem, static bool kgem_retire__partials(struct kgem *kgem) { - struct list *list[] = { - &kgem->active_partials, - &kgem->cached_partials, - NULL - }, **head = list; bool retired = false; - do while (!list_is_empty(*head)) { + while (!list_is_empty(&kgem->active_partials)) { struct kgem_partial_bo *bo = - list_last_entry(*head, + list_last_entry(&kgem->active_partials, struct kgem_partial_bo, base.list); @@ -1409,7 +1403,7 @@ static bool kgem_retire__partials(struct kgem *kgem) kgem_partial_buffer_release(kgem, bo); kgem_bo_unref(kgem, &bo->base); retired = true; - } while (*++head); + } return retired; } @@ -1765,12 +1759,8 @@ static void kgem_finish_partials(struct kgem *kgem) decouple: DBG(("%s: releasing handle=%d\n", __FUNCTION__, bo->base.handle)); - if (!list_is_empty(&bo->base.vma)) { - list_move(&bo->base.list, &kgem->cached_partials); - } else { - list_del(&bo->base.list); - kgem_bo_unref(kgem, &bo->base); - } + list_del(&bo->base.list); + kgem_bo_unref(kgem, &bo->base); } } diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 44d43274..273240ff 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -125,7 +125,7 @@ struct kgem { struct list large; struct list active[NUM_CACHE_BUCKETS][3]; struct list inactive[NUM_CACHE_BUCKETS]; - struct list batch_partials, active_partials, cached_partials; + struct list batch_partials, active_partials; struct list requests; struct list sync_list; struct kgem_request *next_request; |