Quoting Chris Wilson (2018-02-19 10:57:27)
> When we descend the tree to find our slot, if we step to the right, we
> are no longer the leftmost node.
>
> Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection")
> Signed-off-by: Chris Wilson <[email protected]>
> Cc: Davidlohr Bueso <[email protected]>
> Cc: Jérôme Glisse <[email protected]>
> Cc: Christian König <[email protected]>
<SNIP>
> @@ -208,11 +209,11 @@ static void drm_mm_interval_tree_add_node(struct
> drm_mm_node *hole_node,
> parent = rb_entry(rb, struct drm_mm_node, rb);
> if (parent->__subtree_last < node->__subtree_last)
> parent->__subtree_last = node->__subtree_last;
> - if (node->start < parent->start)
> + if (node->start < parent->start) {
> link = &parent->rb.rb_left;
> - else {
> + } else {
> link = &parent->rb.rb_right;
> - leftmost = true;
> + leftmost = false;
As this bug didn't have any functional effect, we could go with
rb_insert_augmented and not try to cache the node if the information
ends up being unused.
Reviewed-by: Joonas Lahtinen <[email protected]>
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx