Lines Matching refs:bo_cache
196 if (vc4->bo_cache.size_list_size <= page_index) { in vc4_get_cache_list_for_size()
197 uint32_t new_size = max(vc4->bo_cache.size_list_size * 2, in vc4_get_cache_list_for_size()
210 for (i = 0; i < vc4->bo_cache.size_list_size; i++) { in vc4_get_cache_list_for_size()
212 &vc4->bo_cache.size_list[i]; in vc4_get_cache_list_for_size()
220 for (i = vc4->bo_cache.size_list_size; i < new_size; i++) in vc4_get_cache_list_for_size()
223 kfree(vc4->bo_cache.size_list); in vc4_get_cache_list_for_size()
224 vc4->bo_cache.size_list = new_list; in vc4_get_cache_list_for_size()
225 vc4->bo_cache.size_list_size = new_size; in vc4_get_cache_list_for_size()
228 return &vc4->bo_cache.size_list[page_index]; in vc4_get_cache_list_for_size()
236 while (!list_empty(&vc4->bo_cache.time_list)) { in vc4_bo_cache_purge()
237 struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list, in vc4_bo_cache_purge()
359 if (page_index >= vc4->bo_cache.size_list_size) in vc4_bo_get_from_cache()
362 if (list_empty(&vc4->bo_cache.size_list[page_index])) in vc4_bo_get_from_cache()
365 bo = list_first_entry(&vc4->bo_cache.size_list[page_index], in vc4_bo_get_from_cache()
505 while (!list_empty(&vc4->bo_cache.time_list)) { in vc4_bo_cache_free_old()
506 struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list, in vc4_bo_cache_free_old()
509 mod_timer(&vc4->bo_cache.time_timer, in vc4_bo_cache_free_old()
579 list_add(&bo->unref_head, &vc4->bo_cache.time_list); in vc4_free_object()
592 container_of(work, struct vc4_dev, bo_cache.time_work); in vc4_bo_cache_time_work()
653 struct vc4_dev *vc4 = from_timer(vc4, t, bo_cache.time_timer); in vc4_bo_cache_time_timer()
655 schedule_work(&vc4->bo_cache.time_work); in vc4_bo_cache_time_timer()
1031 INIT_LIST_HEAD(&vc4->bo_cache.time_list); in vc4_bo_cache_init()
1033 INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work); in vc4_bo_cache_init()
1034 timer_setup(&vc4->bo_cache.time_timer, vc4_bo_cache_time_timer, 0); in vc4_bo_cache_init()
1044 del_timer(&vc4->bo_cache.time_timer); in vc4_bo_cache_destroy()
1045 cancel_work_sync(&vc4->bo_cache.time_work); in vc4_bo_cache_destroy()