Lines Matching refs:hole

379  * DECLARE_NEXT_HOLE_ADDR - macro to declare next hole functions
384 * This macro declares a function to return the next hole of the addr rb tree.
448 * 0 on success, -ENOSPC if there's no hole where @node is.
452 struct drm_mm_node *hole;
461 /* Find the relevant hole to add our node to */
462 hole = find_hole_addr(mm, node->start, 0);
463 if (!hole)
466 adj_start = hole_start = __drm_mm_hole_node_start(hole);
467 adj_end = hole_end = hole_start + hole->hole_size;
470 mm->color_adjust(hole, node->color, &adj_start, &adj_end);
478 list_add(&node->node_list, &hole->node_list);
479 drm_mm_interval_tree_add_node(hole, node);
482 rm_hole(hole);
484 add_hole(hole);
512 * 0 on success, -ENOSPC if there's no suitable hole.
521 struct drm_mm_node *hole;
540 for (hole = first_hole(mm, range_start, range_end, size, mode);
541 hole;
542 hole = once ? NULL : next_hole(mm, hole, size, mode)) {
543 u64 hole_start = __drm_mm_hole_node_start(hole);
544 u64 hole_end = hole_start + hole->hole_size;
557 mm->color_adjust(hole, color, &col_start, &col_end);
597 list_add(&node->node_list, &hole->node_list);
598 drm_mm_interval_tree_add_node(hole, node);
600 rm_hole(hole);
602 add_hole(hole);
692 * until there's a suitable hole: Especially for big objects or nodes that
701 * drm_mm_scan_add_block() until a suitable hole is found or there are no
730 * hole.
775 * hole.
778 * True if a hole has been found, false otherwise.
784 struct drm_mm_node *hole;
795 /* Remove this block from the node_list so that we enlarge the hole
800 hole = list_prev_entry(node, node_list);
801 DRM_MM_BUG_ON(list_next_entry(hole, node_list) != node);
804 hole_start = __drm_mm_hole_node_start(hole);
805 hole_end = __drm_mm_hole_node_end(hole);
810 mm->color_adjust(hole, scan->color, &col_start, &col_end);
869 * return false when no hole has been found.
889 * hole.
902 * drm_mm_scan_color_evict - evict overlapping nodes on either side of hole
903 * @scan: drm_mm scan with target hole
906 * need to remove a few more nodes from either side of the target hole if
915 struct drm_mm_node *hole;
924 * The hole found during scanning should ideally be the first element
928 list_for_each_entry(hole, &mm->hole_stack, hole_stack) {
929 hole_start = __drm_mm_hole_node_start(hole);
930 hole_end = hole_start + hole->hole_size;
937 /* We should only be called after we found the hole previously */
938 DRM_MM_BUG_ON(&hole->hole_stack == &mm->hole_stack);
939 if (unlikely(&hole->hole_stack == &mm->hole_stack))
945 mm->color_adjust(hole, scan->color, &hole_start, &hole_end);
947 return hole;
949 return list_next_entry(hole, node_list);
974 /* Clever trick to avoid a special case in the free hole tracking. */