diff options
author | Rafael Antognolli <[email protected]> | 2019-09-30 12:34:12 -0700 |
---|---|---|
committer | Rafael Antognolli <[email protected]> | 2019-09-30 13:43:23 -0700 |
commit | b9994cb8d518235649544fadbf24ab3763d96f39 (patch) | |
tree | c7d470a1558655aa7ed52a1ddb1a9901674f1cb5 /src/intel/tools | |
parent | 089da33c4d7c08a9f7c82cbe05a38c73596ed6aa (diff) |
intel/tools: Fix aubinator usage of rb_tree.
The order of comparison has changed, so we need to invert the logic of
"insert_left" when using rb_tree_insert_at().
Fixes: dae33052dbf (util/rb_tree: Reverse the order of comparison
functions).
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/tools')
-rw-r--r-- | src/intel/tools/aub_mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/tools/aub_mem.c b/src/intel/tools/aub_mem.c index 2f70afc8b76..5dd1c618443 100644 --- a/src/intel/tools/aub_mem.c +++ b/src/intel/tools/aub_mem.c @@ -109,7 +109,7 @@ ensure_ggtt_entry(struct aub_mem *mem, uint64_t virt_addr) if (!node || (cmp = cmp_ggtt_entry(node, &virt_addr))) { struct ggtt_entry *new_entry = calloc(1, sizeof(*new_entry)); new_entry->virt_addr = virt_addr; - rb_tree_insert_at(&mem->ggtt, node, &new_entry->node, cmp > 0); + rb_tree_insert_at(&mem->ggtt, node, &new_entry->node, cmp < 0); node = &new_entry->node; } @@ -153,7 +153,7 @@ ensure_phys_mem(struct aub_mem *mem, uint64_t phys_addr) mem->mem_fd, new_mem->fd_offset); assert(new_mem->data != MAP_FAILED); - rb_tree_insert_at(&mem->mem, node, &new_mem->node, cmp > 0); + rb_tree_insert_at(&mem->mem, node, &new_mem->node, cmp < 0); node = &new_mem->node; } |