Lines Matching refs:drm_mm
1 /* $NetBSD: drm_mm.c,v 1.20 2022/09/01 11:48:59 riastradh Exp $ */
48 __KERNEL_RCSID(0, "$NetBSD: drm_mm.c,v 1.20 2022/09/01 11:48:59 riastradh Exp $");
56 #include <drm/drm_mm.h>
61 * drm_mm provides a simple range allocator. The drivers are free to use the
62 * resource allocator from the linux core if it suits them, the upside of drm_mm
66 * The main data struct is &drm_mm, allocations are tracked in &drm_mm_node.
68 * datastructures. drm_mm itself will not do any memory allocations of its own,
79 * drm_mm maintains a stack of most recently freed holes, which of all
82 * searches are O(num_holes). Given that all the fancy features drm_mm supports
86 * drm_mm supports a few features: Alignment and range restrictions can be
123 static void show_leaks(struct drm_mm *mm)
154 static void show_leaks(struct drm_mm *mm) { }
167 __drm_mm_interval_first(const struct drm_mm *mm_const, u64 start, u64 last)
169 struct drm_mm *mm = __UNCONST(mm_const);
188 struct drm_mm *mm = hole_node->mm;
363 struct drm_mm *mm = node->mm;
408 static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
437 static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
464 first_hole(struct drm_mm *mm,
487 next_hole(struct drm_mm *mm,
522 * @mm: drm_mm allocator to insert @node into
534 int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
586 * @mm: drm_mm to allocate from
600 int drm_mm_insert_node_in_range(struct drm_mm * const mm,
711 * This just removes a node from its drm_mm allocator. The node does not need to
712 * be cleared again before it can be re-inserted into this or any other drm_mm
717 struct drm_mm *mm = node->mm;
754 struct drm_mm *mm = old->mm;
815 * @mm: drm_mm to scan
831 struct drm_mm *mm,
865 * @scan: the active drm_mm scanner
877 struct drm_mm *mm = scan->mm;
948 * @scan: the active drm_mm scanner
997 * @scan: drm_mm scan with target hole
1008 struct drm_mm *mm = scan->mm;
1051 * @mm: the drm_mm structure to initialize
1057 void drm_mm_init(struct drm_mm *mm, u64 start, u64 size)
1087 * drm_mm_takedown - clean up a drm_mm allocator
1088 * @mm: drm_mm allocator to clean up
1093 void drm_mm_takedown(struct drm_mm *mm)
1116 * @mm: drm_mm allocator to print
1119 void drm_mm_print(const struct drm_mm *mm, struct drm_printer *p)