Lines Matching refs:hole_node
105 static void drm_mm_insert_helper(struct drm_mm_node *hole_node,
110 struct drm_mm *mm = hole_node->mm;
111 unsigned long hole_start = drm_mm_hole_node_start(hole_node);
112 unsigned long hole_end = drm_mm_hole_node_end(hole_node);
119 mm->color_adjust(hole_node, color, &adj_start, &adj_end);
128 hole_node->hole_follows = 0;
129 list_del(&hole_node->hole_stack);
139 list_add(&node->node_list, &hole_node->node_list, (caddr_t)node);
194 struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *hole_node,
202 node = drm_mm_kmalloc(hole_node->mm, atomic);
206 drm_mm_insert_helper(hole_node, node, size, alignment, color);
220 struct drm_mm_node *hole_node;
222 hole_node = drm_mm_search_free_generic(mm, size, alignment,
224 if (!hole_node)
227 drm_mm_insert_helper(hole_node, node, size, alignment, color);
237 static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node,
243 struct drm_mm *mm = hole_node->mm;
244 unsigned long hole_start = drm_mm_hole_node_start(hole_node);
245 unsigned long hole_end = drm_mm_hole_node_end(hole_node);
249 BUG_ON(!hole_node->hole_follows || node->allocated);
257 mm->color_adjust(hole_node, color, &adj_start, &adj_end);
266 hole_node->hole_follows = 0;
267 list_del(&hole_node->hole_stack);
277 list_add(&node->node_list, &hole_node->node_list, (caddr_t)node);
289 struct drm_mm_node *drm_mm_get_block_range_generic(struct drm_mm_node *hole_node,
299 node = drm_mm_kmalloc(hole_node->mm, atomic);
303 drm_mm_insert_helper_range(hole_node, node, size, alignment, color,
318 struct drm_mm_node *hole_node;
320 hole_node = drm_mm_search_free_in_range_generic(mm,
323 if (!hole_node)
326 drm_mm_insert_helper_range(hole_node, node,
745 unsigned long __drm_mm_hole_node_start(struct drm_mm_node *hole_node)
747 return hole_node->start + hole_node->size;
750 unsigned long drm_mm_hole_node_start(struct drm_mm_node *hole_node)
752 BUG_ON(!hole_node->hole_follows);
753 return __drm_mm_hole_node_start(hole_node);
756 unsigned long __drm_mm_hole_node_end(struct drm_mm_node *hole_node)
759 node = list_entry(hole_node->node_list.next,
764 unsigned long drm_mm_hole_node_end(struct drm_mm_node *hole_node)
766 return __drm_mm_hole_node_end(hole_node);