Lines Matching defs:size
33 static void add_bucket(struct etna_bo_cache *cache, int size)
40 cache->cache_bucket[i].size = size;
46 unsigned long size, cache_max_size = 64 * 1024 * 1024;
61 for (size = 4 * 4096; size <= cache_max_size; size *= 2) {
62 add_bucket(cache, size);
63 add_bucket(cache, size + size * 1 / 4);
64 add_bucket(cache, size + size * 2 / 4);
65 add_bucket(cache, size + size * 3 / 4);
96 static struct etna_bo_bucket *get_bucket(struct etna_bo_cache *cache, uint32_t size)
101 * way to the correct bucket size rather than looping..
105 if (bucket->size >= size) {
156 * NOTE: size is potentially rounded up to bucket size
158 drm_private struct etna_bo *etna_bo_cache_alloc(struct etna_bo_cache *cache, uint32_t *size,
164 *size = ALIGN(*size, 4096);
165 bucket = get_bucket(cache, *size);
169 *size = bucket->size;
183 struct etna_bo_bucket *bucket = get_bucket(cache, bo->size);