ac/spm: fix determining the counter slot
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: e928f475cc ("ac: add initial SPM support")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13758>
This commit is contained in:
@@ -103,7 +103,7 @@ ac_spm_map_counter(struct ac_spm_trace_data *spm_trace,
|
||||
/* Generic blocks. */
|
||||
for (unsigned i = 0; i < block_sel->num_counters; i++) {
|
||||
struct ac_spm_counter_select *cntr_sel = &block_sel->counters[i];
|
||||
int index = ffs(~cntr_sel->active);
|
||||
int index = ffs(~cntr_sel->active) - 1;
|
||||
|
||||
switch (index) {
|
||||
case 0: /* use S_037004_PERF_SEL */
|
||||
|
||||
Reference in New Issue
Block a user