Lines Matching refs:engn
52 gk104_fifo_engine_status(struct gk104_fifo *fifo, int engn, in gk104_fifo_engine_status() argument
55 struct nvkm_engine *engine = fifo->engine[engn].engine; in gk104_fifo_engine_status()
58 u32 stat = nvkm_rd32(device, 0x002640 + (engn * 0x08)); in gk104_fifo_engine_status()
90 engn, status->busy, status->faulted, in gk104_fifo_engine_status()
103 if (oclass->engn == &fifo->func->chan) { in gk104_fifo_class_new()
104 const struct gk104_fifo_chan_user *user = oclass->engn; in gk104_fifo_class_new()
107 if (oclass->engn == &fifo->func->user) { in gk104_fifo_class_new()
108 const struct gk104_fifo_user_user *user = oclass->engn; in gk104_fifo_class_new()
124 oclass->engn = &fifo->func->user; in gk104_fifo_class_get()
130 oclass->engn = &fifo->func->chan; in gk104_fifo_class_get()
282 int engn, runl; in gk104_fifo_recover_work() local
293 for (todo = engm; engn = __ffs(todo), todo; todo &= ~BIT(engn)) { in gk104_fifo_recover_work()
294 if ((engine = fifo->engine[engn].engine)) { in gk104_fifo_recover_work()
307 static void gk104_fifo_recover_engn(struct gk104_fifo *fifo, int engn);
364 unsigned long engn, engm = fifo->runlist[runl].engm; in gk104_fifo_recover_chan() local
386 for_each_set_bit(engn, &engm, fifo->engine_nr) { in gk104_fifo_recover_chan()
388 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_recover_chan()
391 gk104_fifo_recover_engn(fifo, engn); in gk104_fifo_recover_chan()
396 gk104_fifo_recover_engn(struct gk104_fifo *fifo, int engn) in gk104_fifo_recover_engn() argument
398 struct nvkm_engine *engine = fifo->engine[engn].engine; in gk104_fifo_recover_engn()
401 const u32 runl = fifo->engine[engn].runl; in gk104_fifo_recover_engn()
402 const u32 engm = BIT(engn); in gk104_fifo_recover_engn()
415 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_recover_engn()
444 nvkm_wr32(device, 0x002a30 + (engn * 0x04), 0x00000100 | mmui); in gk104_fifo_recover_engn()
448 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_recover_engn()
454 nvkm_wr32(device, 0x002a30 + (engn * 0x04), 0x00000000); in gk104_fifo_recover_engn()
460 nvkm_warn(subdev, "engine %d: scheduled for recovery\n", engn); in gk104_fifo_recover_engn()
475 int engn; in gk104_fifo_fault() local
538 for (engn = 0; engn < fifo->engine_nr && engine; engn++) { in gk104_fifo_fault()
539 if (fifo->engine[engn].engine == engine) { in gk104_fifo_fault()
540 gk104_fifo_recover_engn(fifo, engn); in gk104_fifo_fault()
583 u32 engn; in gk104_fifo_intr_sched_ctxsw() local
592 for (engn = 0; engn < fifo->engine_nr; engn++) { in gk104_fifo_intr_sched_ctxsw()
595 gk104_fifo_engine_status(fifo, engn, &status); in gk104_fifo_intr_sched_ctxsw()
599 engm |= BIT(engn); in gk104_fifo_intr_sched_ctxsw()
602 for_each_set_bit(engn, &engm, fifo->engine_nr) in gk104_fifo_intr_sched_ctxsw()
603 gk104_fifo_recover_engn(fifo, engn); in gk104_fifo_intr_sched_ctxsw()
884 int runl = mthd - NV_DEVICE_FIFO_RUNLIST_ENGINES(0), engn; in gk104_fifo_info() local
889 for_each_set_bit(engn, &engm, fifo->engine_nr) { in gk104_fifo_info()
890 if ((engine = fifo->engine[engn].engine)) in gk104_fifo_info()
909 int engn, runl, pbid, ret, i, j; in gk104_fifo_oneinit() local
925 while ((int)(engidx = nvkm_top_engine(device, i++, &runl, &engn)) >= 0) { in gk104_fifo_oneinit()
935 engn, runl, pbid, nvkm_subdev_name[engidx]); in gk104_fifo_oneinit()
937 fifo->engine[engn].engine = nvkm_device_engine(device, engidx); in gk104_fifo_oneinit()
938 fifo->engine[engn].runl = runl; in gk104_fifo_oneinit()
939 fifo->engine[engn].pbid = pbid; in gk104_fifo_oneinit()
940 fifo->engine_nr = max(fifo->engine_nr, engn + 1); in gk104_fifo_oneinit()
941 fifo->runlist[runl].engm |= 1 << engn; in gk104_fifo_oneinit()