Lines Matching refs:bo_cache
200 if (vc4->bo_cache.size_list_size <= page_index) { in vc4_get_cache_list_for_size()
201 uint32_t new_size = max(vc4->bo_cache.size_list_size * 2, in vc4_get_cache_list_for_size()
214 for (i = 0; i < vc4->bo_cache.size_list_size; i++) { in vc4_get_cache_list_for_size()
216 &vc4->bo_cache.size_list[i]; in vc4_get_cache_list_for_size()
224 for (i = vc4->bo_cache.size_list_size; i < new_size; i++) in vc4_get_cache_list_for_size()
227 kfree(vc4->bo_cache.size_list); in vc4_get_cache_list_for_size()
228 vc4->bo_cache.size_list = new_list; in vc4_get_cache_list_for_size()
229 vc4->bo_cache.size_list_size = new_size; in vc4_get_cache_list_for_size()
232 return &vc4->bo_cache.size_list[page_index]; in vc4_get_cache_list_for_size()
240 while (!list_empty(&vc4->bo_cache.time_list)) { in vc4_bo_cache_purge()
241 struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list, in vc4_bo_cache_purge()
367 if (page_index >= vc4->bo_cache.size_list_size) in vc4_bo_get_from_cache()
370 if (list_empty(&vc4->bo_cache.size_list[page_index])) in vc4_bo_get_from_cache()
373 bo = list_first_entry(&vc4->bo_cache.size_list[page_index], in vc4_bo_get_from_cache()
527 while (!list_empty(&vc4->bo_cache.time_list)) { in vc4_bo_cache_free_old()
528 struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list, in vc4_bo_cache_free_old()
531 mod_timer(&vc4->bo_cache.time_timer, in vc4_bo_cache_free_old()
601 list_add(&bo->unref_head, &vc4->bo_cache.time_list); in vc4_free_object()
614 container_of(work, struct vc4_dev, bo_cache.time_work); in vc4_bo_cache_time_work()
684 struct vc4_dev *vc4 = from_timer(vc4, t, bo_cache.time_timer); in vc4_bo_cache_time_timer()
686 schedule_work(&vc4->bo_cache.time_work); in vc4_bo_cache_time_timer()
1039 INIT_LIST_HEAD(&vc4->bo_cache.time_list); in vc4_bo_cache_init()
1041 INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work); in vc4_bo_cache_init()
1042 timer_setup(&vc4->bo_cache.time_timer, vc4_bo_cache_time_timer, 0); in vc4_bo_cache_init()
1052 del_timer(&vc4->bo_cache.time_timer); in vc4_bo_cache_destroy()
1053 cancel_work_sync(&vc4->bo_cache.time_work); in vc4_bo_cache_destroy()