Mesa (master): i965: perf: consolidate unmapping oa perf bo outside accumulation
Lionel Landwerlin
llandwerlin at kemper.freedesktop.org
Thu Mar 8 23:07:42 UTC 2018
Module: Mesa
Branch: master
Commit: d10a39ebe085dc28ab7352f76b57d628928e1e40
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d10a39ebe085dc28ab7352f76b57d628928e1e40
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Wed Mar 7 14:10:15 2018 +0000
i965: perf: consolidate unmapping oa perf bo outside accumulation
Do this in one place outside the only caller of the accumulation
function.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/mesa/drivers/dri/i965/brw_performance_query.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index 71ea26753e..13eff31ee6 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -1014,8 +1014,6 @@ end:
DBG("Marking %d accumulated - results gathered\n", o->Id);
- brw_bo_unmap(obj->oa.bo);
- obj->oa.map = NULL;
obj->oa.results_accumulated = true;
drop_from_unaccumulated_query_list(brw, obj);
dec_n_oa_users(brw);
@@ -1024,8 +1022,6 @@ end:
error:
- brw_bo_unmap(obj->oa.bo);
- obj->oa.map = NULL;
discard_all_queries(brw);
}
@@ -1470,6 +1466,9 @@ get_oa_counter_data(struct brw_context *brw,
if (!obj->oa.results_accumulated) {
accumulate_oa_reports(brw, obj);
assert(obj->oa.results_accumulated);
+
+ brw_bo_unmap(obj->oa.bo);
+ obj->oa.map = NULL;
}
for (int i = 0; i < n_counters; i++) {
More information about the mesa-commit
mailing list