Lines Matching refs:chunk_size
97 int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size) in drm_buddy_init() argument
102 if (size < chunk_size) in drm_buddy_init()
105 if (chunk_size < PAGE_SIZE) in drm_buddy_init()
108 if (!is_power_of_2(chunk_size)) in drm_buddy_init()
111 size = round_down(size, chunk_size); in drm_buddy_init()
115 mm->chunk_size = chunk_size; in drm_buddy_init()
116 mm->max_order = ilog2(size) - ilog2(chunk_size); in drm_buddy_init()
150 order = ilog2(root_size) - ilog2(chunk_size); in drm_buddy_init()
159 BUG_ON(drm_buddy_block_size(mm, root) < chunk_size); in drm_buddy_init()
217 offset + (mm->chunk_size << block_order)); in split_block()
613 if (!new_size || !IS_ALIGNED(new_size, mm->chunk_size)) in drm_buddy_block_trim()
673 if (size < mm->chunk_size) in drm_buddy_alloc_blocks()
676 if (min_page_size < mm->chunk_size) in drm_buddy_alloc_blocks()
682 if (!IS_ALIGNED(start | end | size, mm->chunk_size)) in drm_buddy_alloc_blocks()
698 pages = size >> ilog2(mm->chunk_size); in drm_buddy_alloc_blocks()
700 min_order = ilog2(min_page_size) - ilog2(mm->chunk_size); in drm_buddy_alloc_blocks()
773 mm->chunk_size >> 10, mm->size >> 20, mm->avail >> 20); in drm_buddy_print()
786 free = count * (mm->chunk_size << order); in drm_buddy_print()