Lines Matching refs:hole_node
104 static inline unsigned long drm_mm_hole_node_start(struct drm_mm_node *hole_node) in drm_mm_hole_node_start() argument
106 return hole_node->start + hole_node->size; in drm_mm_hole_node_start()
109 static inline unsigned long drm_mm_hole_node_end(struct drm_mm_node *hole_node) in drm_mm_hole_node_end() argument
112 list_entry(hole_node->node_list.next, struct drm_mm_node, in drm_mm_hole_node_end()
118 static void drm_mm_insert_helper(struct drm_mm_node *hole_node, in drm_mm_insert_helper() argument
122 struct drm_mm *mm = hole_node->mm; in drm_mm_insert_helper()
124 unsigned long hole_start = drm_mm_hole_node_start(hole_node); in drm_mm_insert_helper()
125 unsigned long hole_end = drm_mm_hole_node_end(hole_node); in drm_mm_insert_helper()
127 BUG_ON(!hole_node->hole_follows || node->allocated); in drm_mm_insert_helper()
133 hole_node->hole_follows = 0; in drm_mm_insert_helper()
134 list_del_init(&hole_node->hole_stack); in drm_mm_insert_helper()
144 list_add(&node->node_list, &hole_node->node_list); in drm_mm_insert_helper()
156 struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *hole_node, in drm_mm_get_block_generic() argument
163 node = drm_mm_kmalloc(hole_node->mm, atomic); in drm_mm_get_block_generic()
167 drm_mm_insert_helper(hole_node, node, size, alignment); in drm_mm_get_block_generic()
181 struct drm_mm_node *hole_node; in drm_mm_insert_node() local
183 hole_node = drm_mm_search_free(mm, size, alignment, 0); in drm_mm_insert_node()
184 if (!hole_node) in drm_mm_insert_node()
187 drm_mm_insert_helper(hole_node, node, size, alignment); in drm_mm_insert_node()
193 static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node, in drm_mm_insert_helper_range() argument
198 struct drm_mm *mm = hole_node->mm; in drm_mm_insert_helper_range()
200 unsigned long hole_start = drm_mm_hole_node_start(hole_node); in drm_mm_insert_helper_range()
201 unsigned long hole_end = drm_mm_hole_node_end(hole_node); in drm_mm_insert_helper_range()
203 BUG_ON(!hole_node->hole_follows || node->allocated); in drm_mm_insert_helper_range()
214 hole_node->hole_follows = 0; in drm_mm_insert_helper_range()
215 list_del_init(&hole_node->hole_stack); in drm_mm_insert_helper_range()
224 list_add(&node->node_list, &hole_node->node_list); in drm_mm_insert_helper_range()
237 struct drm_mm_node *drm_mm_get_block_range_generic(struct drm_mm_node *hole_node, in drm_mm_get_block_range_generic() argument
246 node = drm_mm_kmalloc(hole_node->mm, atomic); in drm_mm_get_block_range_generic()
250 drm_mm_insert_helper_range(hole_node, node, size, alignment, in drm_mm_get_block_range_generic()
266 struct drm_mm_node *hole_node; in drm_mm_insert_node_in_range() local
268 hole_node = drm_mm_search_free_in_range(mm, size, alignment, in drm_mm_insert_node_in_range()
270 if (!hole_node) in drm_mm_insert_node_in_range()
273 drm_mm_insert_helper_range(hole_node, node, size, alignment, in drm_mm_insert_node_in_range()