From d6b2c77fac5c07e41a289af772ef3d0410532e21 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 28 Jun 2022 14:20:02 +0000 Subject: [PATCH] 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 Fixes: 8750f43a9077 ("intel/perf: add performance query layout using MI_SRM") Reviewed-by: Ivan Briano Part-of: (cherry picked from commit 61fef1ed726b69b28ece60fb10bd5a65fcefb296) --- .pick_status.json | 2 +- src/intel/perf/intel_perf.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index f551e69..f9a8943 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2551,7 +2551,7 @@ "description": "intel/perf: fix B/C counters accumulation in non query mode", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "8750f43a9077b3b53f54505aaa2cc46fab5d4f90" }, diff --git a/src/intel/perf/intel_perf.c b/src/intel/perf/intel_perf.c index 5841456..007ca94 100644 --- a/src/intel/perf/intel_perf.c +++ b/src/intel/perf/intel_perf.c @@ -1084,7 +1084,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, -- 2.7.4