[Mesa-dev] [PATCH 7/9] intel: aubinator: move address masking

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Jun 14 17:11:43 UTC 2018


The Masking is only needed for entry matching.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/intel/tools/aubinator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index 2a1b91c0e54..6f2e0d503df 100644
--- a/src/intel/tools/aubinator.c
+++ b/src/intel/tools/aubinator.c
@@ -329,12 +329,12 @@ get_ggtt_batch_bo(void *user_data, uint64_t address)
 {
    struct gen_batch_decode_bo bo = {0};
 
-   address &= ~0xfff;
-
    list_for_each_entry(struct bo_map, i, &maps, link)
       if (i->bo.addr <= address && i->bo.addr + i->bo.size > address)
          return i->bo;
 
+   address &= ~0xfff;
+
    struct ggtt_entry *start =
       (struct ggtt_entry *)rb_tree_search_sloppy(&ggtt, &address,
                                                  cmp_ggtt_entry);
-- 
2.17.1



More information about the mesa-dev mailing list