Lines Matching refs:ctr

129 nvkm_perfsrc_enable(struct nvkm_pm *pm, struct nvkm_perfctr *ctr)  in nvkm_perfsrc_enable()  argument
140 for (j = 0; j < 8 && ctr->source[i][j]; j++) { in nvkm_perfsrc_enable()
141 sig = nvkm_perfsig_find(pm, ctr->domain, in nvkm_perfsrc_enable()
142 ctr->signal[i], &dom); in nvkm_perfsrc_enable()
146 src = nvkm_perfsrc_find(pm, sig, ctr->source[i][j]); in nvkm_perfsrc_enable()
155 value |= ((ctr->source[i][j] >> 32) << src->shift); in nvkm_perfsrc_enable()
168 nvkm_perfsrc_disable(struct nvkm_pm *pm, struct nvkm_perfctr *ctr) in nvkm_perfsrc_disable() argument
179 for (j = 0; j < 8 && ctr->source[i][j]; j++) { in nvkm_perfsrc_disable()
180 sig = nvkm_perfsig_find(pm, ctr->domain, in nvkm_perfsrc_disable()
181 ctr->signal[i], &dom); in nvkm_perfsrc_disable()
185 src = nvkm_perfsrc_find(pm, sig, ctr->source[i][j]); in nvkm_perfsrc_disable()
224 if (dom->ctr[i]) { in nvkm_perfdom_init()
225 dom->func->init(pm, dom, dom->ctr[i]); in nvkm_perfdom_init()
228 nvkm_perfsrc_enable(pm, dom->ctr[i]); in nvkm_perfdom_init()
278 if (dom->ctr[i]) in nvkm_perfdom_read()
279 dom->func->read(pm, dom, dom->ctr[i]); in nvkm_perfdom_read()
286 if (dom->ctr[i]) in nvkm_perfdom_read()
287 args->v0.ctr[i] = dom->ctr[i]->ctr; in nvkm_perfdom_read()
317 struct nvkm_perfctr *ctr = dom->ctr[i]; in nvkm_perfdom_dtor() local
318 if (ctr) { in nvkm_perfdom_dtor()
319 nvkm_perfsrc_disable(pm, ctr); in nvkm_perfdom_dtor()
320 if (ctr->head.next) in nvkm_perfdom_dtor()
321 list_del(&ctr->head); in nvkm_perfdom_dtor()
323 kfree(ctr); in nvkm_perfdom_dtor()
334 struct nvkm_perfctr *ctr; in nvkm_perfctr_new() local
340 ctr = *pctr = kzalloc(sizeof(*ctr), GFP_KERNEL); in nvkm_perfctr_new()
341 if (!ctr) in nvkm_perfctr_new()
344 ctr->domain = domain; in nvkm_perfctr_new()
345 ctr->logic_op = logic_op; in nvkm_perfctr_new()
346 ctr->slot = slot; in nvkm_perfctr_new()
349 ctr->signal[i] = signal[i] - dom->signal; in nvkm_perfctr_new()
351 ctr->source[i][j] = source[i][j]; in nvkm_perfctr_new()
354 list_add_tail(&ctr->head, &dom->list); in nvkm_perfctr_new()
376 struct nvkm_perfctr *ctr[4] = {}; in nvkm_perfdom_new_() local
388 for (c = 0; c < ARRAY_SIZE(args->v0.ctr); c++) { in nvkm_perfdom_new_()
392 for (s = 0; s < ARRAY_SIZE(args->v0.ctr[c].signal); s++) { in nvkm_perfdom_new_()
394 args->v0.ctr[c].signal[s], in nvkm_perfdom_new_()
396 if (args->v0.ctr[c].signal[s] && !sig[s]) in nvkm_perfdom_new_()
400 src[s][m] = args->v0.ctr[c].source[s][m]; in nvkm_perfdom_new_()
408 args->v0.ctr[c].logic_op, &ctr[c]); in nvkm_perfdom_new_()
425 for (c = 0; c < ARRAY_SIZE(ctr); c++) in nvkm_perfdom_new_()
426 dom->ctr[c] = ctr[c]; in nvkm_perfdom_new_()