Lines Matching defs:cache

41 v3d_bo_cache_free_all(struct v3d_bo_cache *cache);
46 struct v3d_bo_cache *cache = &screen->bo_cache;
50 list_for_each_entry(struct v3d_bo, bo, &cache->time_list, time_list) {
60 if (!list_is_empty(&cache->time_list)) {
61 struct v3d_bo *first = list_first_entry(&cache->time_list,
64 struct v3d_bo *last = list_last_entry(&cache->time_list,
68 fprintf(stderr, " oldest cache time: %ld\n",
70 fprintf(stderr, " newest cache time: %ld\n",
81 v3d_bo_remove_from_cache(struct v3d_bo_cache *cache, struct v3d_bo *bo)
90 struct v3d_bo_cache *cache = &screen->bo_cache;
93 if (cache->size_list_size <= page_index)
97 mtx_lock(&cache->lock);
98 if (!list_is_empty(&cache->size_list[page_index])) {
99 bo = list_first_entry(&cache->size_list[page_index],
107 mtx_unlock(&cache->lock);
112 v3d_bo_remove_from_cache(cache, bo);
116 mtx_unlock(&cache->lock);
135 fprintf(stderr, "Allocated %s %dkb from cache:\n",
237 struct v3d_bo_cache *cache = &screen->bo_cache;
240 list_for_each_entry_safe(struct v3d_bo, bo, &cache->time_list,
249 v3d_bo_remove_from_cache(cache, bo);
263 v3d_bo_cache_free_all(struct v3d_bo_cache *cache)
265 mtx_lock(&cache->lock);
266 list_for_each_entry_safe(struct v3d_bo, bo, &cache->time_list,
268 v3d_bo_remove_from_cache(cache, bo);
271 mtx_unlock(&cache->lock);
278 struct v3d_bo_cache *cache = &screen->bo_cache;
286 if (cache->size_list_size <= page_index) {
293 for (int i = 0; i < cache->size_list_size; i++) {
294 struct list_head *old_head = &cache->size_list[i];
304 for (int i = cache->size_list_size; i < page_index + 1; i++)
307 cache->size_list = new_list;
308 cache->size_list_size = page_index + 1;
312 list_addtail(&bo->size_list, &cache->size_list[page_index]);
313 list_addtail(&bo->time_list, &cache->time_list);
315 fprintf(stderr, "Freed %s %dkb to cache:\n",
543 struct v3d_bo_cache *cache = &screen->bo_cache;
545 v3d_bo_cache_free_all(cache);