Lines Matching refs:engn

40 gk104_fifo_engine_status(struct gk104_fifo *fifo, int engn,  in gk104_fifo_engine_status()  argument
43 struct nvkm_engine *engine = fifo->engine[engn].engine; in gk104_fifo_engine_status()
46 u32 stat = nvkm_rd32(device, 0x002640 + (engn * 0x08)); in gk104_fifo_engine_status()
78 engn, status->busy, status->faulted, in gk104_fifo_engine_status()
91 if (oclass->engn == &fifo->func->chan) { in gk104_fifo_class_new()
92 const struct gk104_fifo_chan_user *user = oclass->engn; in gk104_fifo_class_new()
95 if (oclass->engn == &fifo->func->user) { in gk104_fifo_class_new()
96 const struct gk104_fifo_user_user *user = oclass->engn; in gk104_fifo_class_new()
112 oclass->engn = &fifo->func->user; in gk104_fifo_class_get()
118 oclass->engn = &fifo->func->chan; in gk104_fifo_class_get()
274 int engn; in gk104_fifo_engine_id() local
279 for (engn = 0; engn < fifo->engine_nr && engine; engn++) { in gk104_fifo_engine_id()
280 if (fifo->engine[engn].engine == engine) in gk104_fifo_engine_id()
281 return engn; in gk104_fifo_engine_id()
296 int engn, runl; in gk104_fifo_recover_work() local
307 for (todo = engm; engn = __ffs(todo), todo; todo &= ~BIT(engn)) { in gk104_fifo_recover_work()
308 if ((engine = fifo->engine[engn].engine)) { in gk104_fifo_recover_work()
321 static void gk104_fifo_recover_engn(struct gk104_fifo *fifo, int engn);
378 unsigned long engn, engm = fifo->runlist[runl].engm; in gk104_fifo_recover_chan() local
400 for_each_set_bit(engn, &engm, fifo->engine_nr) { in gk104_fifo_recover_chan()
402 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_recover_chan()
405 gk104_fifo_recover_engn(fifo, engn); in gk104_fifo_recover_chan()
410 gk104_fifo_recover_engn(struct gk104_fifo *fifo, int engn) in gk104_fifo_recover_engn() argument
412 struct nvkm_engine *engine = fifo->engine[engn].engine; in gk104_fifo_recover_engn()
415 const u32 runl = fifo->engine[engn].runl; in gk104_fifo_recover_engn()
416 const u32 engm = BIT(engn); in gk104_fifo_recover_engn()
429 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_recover_engn()
459 nvkm_wr32(device, 0x002a30 + (engn * 0x04), 0x00000100 | mmui); in gk104_fifo_recover_engn()
463 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_recover_engn()
469 nvkm_wr32(device, 0x002a30 + (engn * 0x04), 0x00000000); in gk104_fifo_recover_engn()
475 nvkm_warn(subdev, "engine %d: scheduled for recovery\n", engn); in gk104_fifo_recover_engn()
551 int engn = fifo->base.func->engine_id(&fifo->base, engine); in gk104_fifo_fault() local
552 if (engn >= 0 && engn != GK104_FIFO_ENGN_SW) in gk104_fifo_fault()
553 gk104_fifo_recover_engn(fifo, engn); in gk104_fifo_fault()
594 u32 engn; in gk104_fifo_intr_sched_ctxsw() local
603 for (engn = 0; engn < fifo->engine_nr; engn++) { in gk104_fifo_intr_sched_ctxsw()
606 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_intr_sched_ctxsw()
610 engm |= BIT(engn); in gk104_fifo_intr_sched_ctxsw()
613 for_each_set_bit(engn, &engm, fifo->engine_nr) in gk104_fifo_intr_sched_ctxsw()
614 gk104_fifo_recover_engn(fifo, engn); in gk104_fifo_intr_sched_ctxsw()
897 int engn; in gk104_fifo_info() local
899 for_each_set_bit(engn, &engm, fifo->engine_nr) { in gk104_fifo_info()
900 if ((engine = fifo->engine[engn].engine)) { in gk104_fifo_info()
958 const int engn = tdev->engine; in gk104_fifo_oneinit() local
961 if (engn < 0) in gk104_fifo_oneinit()
972 fifo->engine[engn].engine = nvkm_device_engine(device, tdev->type, tdev->inst); in gk104_fifo_oneinit()
973 if (!fifo->engine[engn].engine) { in gk104_fifo_oneinit()
978 en = fifo->engine[engn].engine->subdev.name; in gk104_fifo_oneinit()
984 fifo->engine[engn].runl = tdev->runlist; in gk104_fifo_oneinit()
985 fifo->engine[engn].pbid = pbid; in gk104_fifo_oneinit()
986 fifo->engine_nr = max(fifo->engine_nr, engn + 1); in gk104_fifo_oneinit()
987 fifo->runlist[tdev->runlist].engm |= BIT(engn); in gk104_fifo_oneinit()
988 fifo->runlist[tdev->runlist].engm_sw |= BIT(engn); in gk104_fifo_oneinit()