Lines Matching refs:counter

72                    struct ac_spm_counter_info *counter,
75 struct ac_spm_muxsel *muxsel = &counter->muxsel;
77 muxsel->counter = 2 * spm_wire + (counter->is_even ? 0 : 1);
86 struct ac_spm_counter_info *counter,
97 cntr_sel->sel0 |= S_036700_PERF_SEL(counter->event_id) |
102 /* 32-bits counter are always even. */
103 counter->is_even = true;
119 cntr_sel->sel0 |= S_037004_PERF_SEL(counter->event_id) |
124 cntr_sel->sel0 |= S_037004_PERF_SEL1(counter->event_id) |
128 cntr_sel->sel1 |= S_037008_PERF_SEL2(counter->event_id) |
132 cntr_sel->sel1 |= S_037008_PERF_SEL3(counter->event_id) |
139 /* Mark this 16-bit counter as used. */
142 /* Determine if the counter is even or odd. */
143 counter->is_even = !(index % 2);
160 struct ac_spm_counter_info *counter;
184 counter = &spm_trace->counters[spm_trace->num_counters];
187 counter->gpu_block = info->gpu_block;
188 counter->instance = info->instance;
189 counter->event_id = info->event_id;
191 /* Get the select block used to configure the counter. */
196 /* Map the counter to the select block. */
197 if (!ac_spm_map_counter(spm_trace, block_sel, counter, &spm_wire)) {
202 /* Determine the counter segment type. */
204 counter->segment_type = AC_SPM_SEGMENT_TYPE_SE0; // XXX
206 counter->segment_type = AC_SPM_SEGMENT_TYPE_GLOBAL;
210 ac_spm_init_muxsel(block, counter, spm_wire);
227 fprintf(stderr, "ac/spm: Failed to add SPM counter (%d).\n", i);
243 struct ac_spm_counter_info *counter = &spm_trace->counters[c];
245 if (counter->segment_type != s)
248 if (counter->is_even) {
294 .counter = 0x30,
306 struct ac_spm_counter_info *counter = &spm_trace->counters[i];
308 if (counter->segment_type != s)
311 if (counter->is_even) {
312 counter->offset = segment_offset + even_line_idx *
321 counter->offset = segment_offset + odd_line_idx *