intel/perf: fix B/C counters accumulation in non query mode

When we're not using queries, all the counters from the
MI_REPORT_PERF_COUNT are available. This is the case when using
perfetto with the global pps datasource that capture global counter
values.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8750f43a90 ("intel/perf: add performance query layout using MI_SRM")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18893>
This commit is contained in:
Lionel Landwerlin 2022-06-28 14:20:02 +00:00 committed by Marge Bot
parent 6c2e7797f5
commit 61fef1ed72

View file

@ -1128,7 +1128,8 @@ intel_perf_query_result_accumulate(struct intel_perf_query_result *result,
result->accumulator + query->a_offset + 32 + i);
}
if (can_use_mi_rpc_bc_counters(&query->perf->devinfo)) {
if (can_use_mi_rpc_bc_counters(&query->perf->devinfo) ||
!query->perf->sys_vars.query_mode) {
/* 8x 32bit B counters */
for (i = 0; i < 8; i++) {
accumulate_uint32(start + 48 + i, end + 48 + i,