Lines Matching defs: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);
657 * until there's a suitable hole: Especially for big objects or nodes that
666 * drm_mm_scan_add_block() until a suitable hole is found or there are no
695 * hole.
740 * hole.
743 * True if a hole has been found, false otherwise.
749 struct drm_mm_node *hole;
760 /* Remove this block from the node_list so that we enlarge the hole
765 hole = list_prev_entry(node, node_list);
766 DRM_MM_BUG_ON(list_next_entry(hole, node_list) != node);
769 hole_start = __drm_mm_hole_node_start(hole);
770 hole_end = __drm_mm_hole_node_end(hole);
775 mm->color_adjust(hole, scan->color, &col_start, &col_end);
834 * return false when no hole has been found.
854 * hole.
867 * drm_mm_scan_color_evict - evict overlapping nodes on either side of hole
868 * @scan: drm_mm scan with target hole
871 * need to remove a few more nodes from either side of the target hole if
880 struct drm_mm_node *hole;
889 * The hole found during scanning should ideally be the first element
893 list_for_each_entry(hole, &mm->hole_stack, hole_stack) {
894 hole_start = __drm_mm_hole_node_start(hole);
895 hole_end = hole_start + hole->hole_size;
902 /* We should only be called after we found the hole previously */
903 DRM_MM_BUG_ON(&hole->hole_stack == &mm->hole_stack);
904 if (unlikely(&hole->hole_stack == &mm->hole_stack))
910 mm->color_adjust(hole, scan->color, &hole_start, &hole_end);
912 return hole;
914 return list_next_entry(hole, node_list);
939 /* Clever trick to avoid a special case in the free hole tracking. */