Lines Matching full:order
16 unsigned int order, in drm_block_alloc() argument
21 BUG_ON(order > DRM_BUDDY_MAX_ORDER); in drm_block_alloc()
28 block->header |= order; in drm_block_alloc()
125 unsigned int order; in __drm_buddy_free() local
158 order = drm_buddy_block_order(block); in __drm_buddy_free()
161 return order; in __drm_buddy_free()
169 unsigned int order; in __force_merge() local
213 order = __drm_buddy_free(mm, block, true); in __force_merge()
214 if (order >= min_order) in __force_merge()
284 unsigned int order; in drm_buddy_init() local
287 order = ilog2(size) - ilog2(chunk_size); in drm_buddy_init()
288 root_size = chunk_size << order; in drm_buddy_init()
290 root = drm_block_alloc(mm, NULL, order, offset); in drm_buddy_init()
328 unsigned int order; in drm_buddy_fini() local
334 order = ilog2(size) - ilog2(mm->chunk_size); in drm_buddy_fini()
335 __force_merge(mm, 0, size, order); in drm_buddy_fini()
340 root_size = mm->chunk_size << order; in drm_buddy_fini()
478 unsigned int order, in __alloc_range_bias() argument
482 u64 req_size = mm->chunk_size << order; in __alloc_range_bias()
506 if (drm_buddy_block_order(block) < order) in __alloc_range_bias()
531 order == drm_buddy_block_order(block)) { in __alloc_range_bias()
570 unsigned int order, in __drm_buddy_alloc_range_bias() argument
576 block = __alloc_range_bias(mm, start, end, order, in __drm_buddy_alloc_range_bias()
579 return __alloc_range_bias(mm, start, end, order, in __drm_buddy_alloc_range_bias()
586 get_maxblock(struct drm_buddy *mm, unsigned int order, in get_maxblock() argument
592 for (i = order; i <= mm->max_order; ++i) { in get_maxblock()
622 unsigned int order, in alloc_from_freelist() argument
630 block = get_maxblock(mm, order, flags); in alloc_from_freelist()
632 /* Store the obtained block order */ in alloc_from_freelist()
635 for (tmp = order; tmp <= mm->max_order; ++tmp) { in alloc_from_freelist()
653 for (tmp = order; tmp <= mm->max_order; ++tmp) { in alloc_from_freelist()
669 while (tmp != order) { in alloc_from_freelist()
680 if (tmp != order) in alloc_from_freelist()
806 unsigned int order; in __alloc_contig_try_harder() local
812 order = fls(pages) - 1; in __alloc_contig_try_harder()
813 if (order == 0) in __alloc_contig_try_harder()
816 list = &mm->free_list[order]; in __alloc_contig_try_harder()
860 * ascending order
945 unsigned int order, in __drm_buddy_alloc_blocks() argument
951 order, flags); in __drm_buddy_alloc_blocks()
954 return alloc_from_freelist(mm, order, flags); in __drm_buddy_alloc_blocks()
985 unsigned int min_order, order; in drm_buddy_alloc_blocks() local
1029 order = fls(pages) - 1; in drm_buddy_alloc_blocks()
1033 order = min(order, (unsigned int)fls(pages) - 1); in drm_buddy_alloc_blocks()
1034 BUG_ON(order > mm->max_order); in drm_buddy_alloc_blocks()
1035 BUG_ON(order < min_order); in drm_buddy_alloc_blocks()
1040 order, in drm_buddy_alloc_blocks()
1045 if (order-- == min_order) { in drm_buddy_alloc_blocks()
1054 order = min_order; in drm_buddy_alloc_blocks()
1081 pages -= BIT(order); in drm_buddy_alloc_blocks()
1149 int order; in drm_buddy_print() local
1154 for (order = mm->max_order; order >= 0; order--) { in drm_buddy_print()
1158 list_for_each_entry(block, &mm->free_list[order], link) { in drm_buddy_print()
1163 drm_printf(p, "order-%2d ", order); in drm_buddy_print()
1165 free = count * (mm->chunk_size << order); in drm_buddy_print()