Lines Matching defs:cache

42 vc4_bo_cache_free_all(struct vc4_bo_cache *cache);
80 struct vc4_bo_cache *cache = &screen->bo_cache;
84 fprintf(stderr, " BOs cached: %d\n", cache->bo_count);
85 fprintf(stderr, " BOs cached size: %dkb\n", cache->bo_size / 1024);
87 if (!list_is_empty(&cache->time_list)) {
88 struct vc4_bo *first = list_entry(cache->time_list.next,
91 struct vc4_bo *last = list_entry(cache->time_list.prev,
95 fprintf(stderr, " oldest cache time: %ld\n",
97 fprintf(stderr, " newest cache time: %ld\n",
108 vc4_bo_remove_from_cache(struct vc4_bo_cache *cache, struct vc4_bo *bo)
112 cache->bo_count--;
113 cache->bo_size -= bo->size;
182 struct vc4_bo_cache *cache = &screen->bo_cache;
186 if (cache->size_list_size <= page_index)
189 mtx_lock(&cache->lock);
190 LIST_FOR_EACH_ENTRY_SAFE(iter, tmp, &cache->size_list[page_index],
201 * another one in the cache.
203 vc4_bo_remove_from_cache(cache, iter);
210 vc4_bo_remove_from_cache(cache, bo);
216 mtx_unlock(&cache->lock);
233 fprintf(stderr, "Allocated %s %dkb from cache:\n",
296 struct vc4_bo_cache *cache = &screen->bo_cache;
299 list_for_each_entry_safe(struct vc4_bo, bo, &cache->time_list,
309 vc4_bo_remove_from_cache(cache, bo);
323 vc4_bo_cache_free_all(struct vc4_bo_cache *cache)
325 mtx_lock(&cache->lock);
326 list_for_each_entry_safe(struct vc4_bo, bo, &cache->time_list,
328 vc4_bo_remove_from_cache(cache, bo);
331 mtx_unlock(&cache->lock);
338 struct vc4_bo_cache *cache = &screen->bo_cache;
346 if (cache->size_list_size <= page_index) {
353 for (int i = 0; i < cache->size_list_size; i++)
354 list_replace(&cache->size_list[i], &new_list[i]);
355 for (int i = cache->size_list_size; i < page_index + 1; i++)
358 cache->size_list = new_list;
359 cache->size_list_size = page_index + 1;
364 list_addtail(&bo->size_list, &cache->size_list[page_index]);
365 list_addtail(&bo->time_list, &cache->time_list);
366 cache->bo_count++;
367 cache->bo_size += bo->size;
369 fprintf(stderr, "Freed %s %dkb to cache:\n",
374 vc4_bo_label(screen, bo, "mesa cache");
486 bo->private = false; /* Make sure it doesn't go back to the cache. */
662 struct vc4_bo_cache *cache = &screen->bo_cache;
664 vc4_bo_cache_free_all(cache);