/linux-6.3-rc2/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
A D | runl.c | 121 runl->func->update(runl); in nvkm_runl_rc() 123 runl->func->fault_clear(runl); in nvkm_runl_rc() 128 runl->func->wait(runl); in nvkm_runl_rc() 138 runl->func->preempt(runl); in nvkm_runl_rc_runl() 263 if (!runl->func->pending(runl)) in nvkm_runl_update_pending() 274 runl->func->update(runl); in nvkm_runl_update_locked() 276 runl->func->wait(runl); in nvkm_runl_update_locked() 289 runl->func->allow(runl, ~0); in nvkm_runl_allow() 303 runl->func->block(runl, ~0); in nvkm_runl_block() 312 runl->func->fini(runl); in nvkm_runl_fini() [all …]
|
A D | ga100.c | 47 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_stop() local 55 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_start() local 66 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_unbind() local 114 struct nvkm_runl *runl = cgrp->runl; in ga100_cgrp_preempt() local 127 struct nvkm_runl *runl = engn->runl; in ga100_engn_cxid() local 353 if (runl->runq[0]->func->intr(runl->runq[0], runl)) in ga100_runl_intr() 360 if (runl->runq[1]->func->intr(runl->runq[1], runl)) in ga100_runl_intr() 391 runl->func->preempt(runl); in ga100_runl_init() 447 runl->runq[runl->runq_nr] = in ga100_runl_new() 449 if (!runl->runq[runl->runq_nr]) in ga100_runl_new() [all …]
|
A D | nv50.c | 256 const u32 segment = ALIGN((runl->cgrp_nr + runl->chan_nr) * runl->func->size, 0x1000); in nv50_runl_alloc() 257 const u32 maxsize = (runl->cgid ? runl->cgid->nr : 0) + runl->chid->nr; in nv50_runl_alloc() 262 maxsize * 2 * runl->func->size, 0, false, &runl->mem); in nv50_runl_alloc() 268 if (runl->offset + segment >= nvkm_memory_size(runl->mem)) { in nv50_runl_alloc() 269 ret = runl->func->wait(runl); in nv50_runl_alloc() 275 runl->offset = 0; in nv50_runl_alloc() 281 return runl->mem; in nv50_runl_alloc() 294 RUNL_TRACE(runl, "RAMRL: update cgrps:%d chans:%d", runl->cgrp_nr, runl->chan_nr); in nv50_runl_update() 324 runl->func->commit(runl, memory, start, count); in nv50_runl_update() 357 runl->func->update(runl); in nv50_fifo_init() [all …]
|
A D | chan.c | 45 struct nvkm_runl *runl = cgrp->runl; in nvkm_chan_cctx_bind() local 139 struct nvkm_runl *runl = chan->cgrp->runl; in nvkm_chan_preempt_locked() local 167 struct nvkm_runl *runl = cgrp->runl; in nvkm_chan_remove_locked() local 174 runl->cgrp_nr--; in nvkm_chan_remove_locked() 177 runl->chan_nr--; in nvkm_chan_remove_locked() 185 struct nvkm_runl *runl = chan->cgrp->runl; in nvkm_chan_remove() local 199 struct nvkm_runl *runl = cgrp->runl; in nvkm_chan_insert() local 209 runl->chan_nr++; in nvkm_chan_insert() 212 runl->cgrp_nr++; in nvkm_chan_insert() 401 if (cgrp->runl != runl || cgrp->vmm != vmm) { in nvkm_chan_new_() [all …]
|
A D | g98.c | 31 struct nvkm_runl *runl; in g98_fifo_runl_ctor() local 33 runl = nvkm_runl_new(fifo, 0, 0, 0); in g98_fifo_runl_ctor() 34 if (IS_ERR(runl)) in g98_fifo_runl_ctor() 35 return PTR_ERR(runl); in g98_fifo_runl_ctor() 37 nvkm_runl_add(runl, 0, fifo->func->engn_sw, NVKM_ENGINE_SW, 0); in g98_fifo_runl_ctor() 39 nvkm_runl_add(runl, 1, fifo->func->engn, NVKM_ENGINE_GR, 0); in g98_fifo_runl_ctor() 40 nvkm_runl_add(runl, 2, fifo->func->engn, NVKM_ENGINE_MSPPP, 0); in g98_fifo_runl_ctor() 41 nvkm_runl_add(runl, 3, fifo->func->engn, NVKM_ENGINE_CE, 0); in g98_fifo_runl_ctor() 43 nvkm_runl_add(runl, 5, fifo->func->engn, NVKM_ENGINE_SEC, 0); in g98_fifo_runl_ctor() 44 nvkm_runl_add(runl, 6, fifo->func->engn, NVKM_ENGINE_MSVLD, 0); in g98_fifo_runl_ctor() [all …]
|
A D | base.c | 41 struct nvkm_runl *runl; in nvkm_fifo_ctxsw_in_progress() local 128 struct nvkm_runl *runl; in nvkm_fifo_fini() local 133 nvkm_runl_fini(runl); in nvkm_fifo_fini() 143 struct nvkm_runl *runl; in nvkm_fifo_init() local 157 if (runl->func->init) in nvkm_fifo_init() 158 runl->func->init(runl); in nvkm_fifo_init() 172 struct nvkm_runl *runl; in nvkm_fifo_info() local 189 if (runl) { in nvkm_fifo_info() 225 if (runl) { in nvkm_fifo_info() 269 RUNL_DEBUG(runl, "chan:%06x", runl->chan); in nvkm_fifo_oneinit() [all …]
|
A D | gk104.c | 74 struct nvkm_runl *runl = chan->cgrp->runl; in gk104_chan_bind() local 406 nvkm_wr32(runl->fifo->engine.subdev.device, 0x00262c, BIT(runl->id)); in gk104_runl_fault_clear() 418 nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, BIT(runl->id), BIT(runl->id)); in gk104_runl_block() 643 struct nvkm_runl *runl; in gk104_fifo_intr_runlist() local 646 nvkm_runl_foreach_cond(runl, fifo, mask & BIT(runl->id)) { in gk104_fifo_intr_runlist() 760 struct nvkm_runl *runl; in gk104_fifo_runl_ctor() local 766 if (!runl) { in gk104_fifo_runl_ctor() 768 if (IS_ERR(runl)) in gk104_fifo_runl_ctor() 772 if (WARN_ON(runl->runq_nr == ARRAY_SIZE(runl->runq))) in gk104_fifo_runl_ctor() 775 runl->runq[runl->runq_nr++] = runq; in gk104_fifo_runl_ctor() [all …]
|
A D | tu102.c | 36 return (chan->cgrp->runl->id << 16) | chan->id; in tu102_chan_doorbell_handle() 62 tu102_runl_pending(struct nvkm_runl *runl) in tu102_runl_pending() argument 64 struct nvkm_device *device = runl->fifo->engine.subdev.device; in tu102_runl_pending() 72 struct nvkm_device *device = runl->fifo->engine.subdev.device; in tu102_runl_commit() 78 nvkm_wr32(device, 0x002b08 + (runl->id * 0x10), count); in tu102_runl_commit() 138 struct nvkm_runl *runl = engn->runl; in tu102_fifo_intr_ctxsw_timeout_info() local 150 cgrp = nvkm_runl_cgrp_get_cgid(runl, info & 0x3fff0000, &flags); in tu102_fifo_intr_ctxsw_timeout_info() 171 struct nvkm_runl *runl; in tu102_fifo_intr_ctxsw_timeout() local 176 nvkm_runl_foreach(runl, fifo) { in tu102_fifo_intr_ctxsw_timeout() 177 nvkm_runl_foreach_engn_cond(engn, runl, engm & BIT(engn->id)) { in tu102_fifo_intr_ctxsw_timeout() [all …]
|
A D | runl.h | 23 struct nvkm_runl *runl; member 34 RUNL_PRINT((e)->runl, l, p, "%02d[%8s]:"f, (e)->id, (e)->engine->subdev.name, ##a) 108 #define nvkm_runl_find_engn(engn,runl,cond) nvkm_list_find(engn, &(runl)->engns, head, (cond)) argument 111 #define nvkm_runl_foreach(runl,fifo) list_for_each_entry((runl), &(fifo)->runls, head) argument 112 #define nvkm_runl_foreach_cond(runl,fifo,cond) nvkm_list_foreach(runl, &(fifo)->runls, head, (cond)) argument 113 #define nvkm_runl_foreach_engn(engn,runl) list_for_each_entry((engn), &(runl)->engns, head) argument 114 #define nvkm_runl_foreach_engn_cond(engn,runl,cond) \ argument 115 nvkm_list_foreach(engn, &(runl)->engns, head, (cond)) 116 #define nvkm_runl_foreach_cgrp(cgrp,runl) list_for_each_entry((cgrp), &(runl)->cgrps, head) argument 117 #define nvkm_runl_foreach_cgrp_safe(cgrp,gtmp,runl) \ argument [all …]
|
A D | gf100.c | 204 struct nvkm_runl *runl = engn->runl; in gf100_engn_mmu_fault_triggered() local 224 struct nvkm_runl *runl = engn->runl; in gf100_engn_mmu_fault_trigger() local 540 struct nvkm_runl *runl; in gf100_fifo_mmu_fault_recover() local 547 nvkm_runl_foreach(runl, fifo) { in gf100_fifo_mmu_fault_recover() 620 struct nvkm_runl *runl; in gf100_fifo_intr_ctxsw_timeout() local 627 nvkm_runl_block(runl); in gf100_fifo_intr_ctxsw_timeout() 647 struct nvkm_runl *runl; in gf100_fifo_intr_sched_ctxsw() local 910 struct nvkm_runl *runl; in gf100_fifo_runl_ctor() local 913 if (IS_ERR(runl)) in gf100_fifo_runl_ctor() 914 return PTR_ERR(runl); in gf100_fifo_runl_ctor() [all …]
|
A D | g84.c | 192 struct nvkm_runl *runl; in g84_fifo_runl_ctor() local 194 runl = nvkm_runl_new(fifo, 0, 0, 0); in g84_fifo_runl_ctor() 195 if (IS_ERR(runl)) in g84_fifo_runl_ctor() 196 return PTR_ERR(runl); in g84_fifo_runl_ctor() 198 nvkm_runl_add(runl, 0, fifo->func->engn_sw, NVKM_ENGINE_SW, 0); in g84_fifo_runl_ctor() 200 nvkm_runl_add(runl, 1, fifo->func->engn, NVKM_ENGINE_GR, 0); in g84_fifo_runl_ctor() 201 nvkm_runl_add(runl, 2, fifo->func->engn, NVKM_ENGINE_MPEG, 0); in g84_fifo_runl_ctor() 202 nvkm_runl_add(runl, 3, fifo->func->engn, NVKM_ENGINE_ME, 0); in g84_fifo_runl_ctor() 203 nvkm_runl_add(runl, 4, fifo->func->engn, NVKM_ENGINE_VP, 0); in g84_fifo_runl_ctor() 205 nvkm_runl_add(runl, 6, fifo->func->engn, NVKM_ENGINE_BSP, 0); in g84_fifo_runl_ctor() [all …]
|
A D | cgrp.c | 175 struct nvkm_runl *runl = cgrp->runl; in nvkm_cgrp_del() local 177 if (runl->cgid) in nvkm_cgrp_del() 178 nvkm_chid_put(runl->cgid, cgrp->id, &cgrp->lock); in nvkm_cgrp_del() 219 nvkm_cgrp_new(struct nvkm_runl *runl, const char *name, struct nvkm_vmm *vmm, bool hw, in nvkm_cgrp_new() argument 227 cgrp->func = runl->fifo->func->cgrp.func; in nvkm_cgrp_new() 229 cgrp->runl = runl; in nvkm_cgrp_new() 242 if (runl->cgid) { in nvkm_cgrp_new() 243 cgrp->id = nvkm_chid_get(runl->cgid, cgrp); in nvkm_cgrp_new() 245 RUNL_ERROR(runl, "!cgids"); in nvkm_cgrp_new()
|
A D | ucgrp.c | 42 return nvkm_uchan_new(cgrp->runl->fifo, cgrp, oclass, argv, argc, pobject); in nvkm_ucgrp_chan_new() 49 struct nvkm_fifo *fifo = cgrp->runl->fifo; in nvkm_ucgrp_sclass() 85 struct nvkm_runl *runl; in nvkm_ucgrp_new() local 98 runl = nvkm_runl_get(fifo, args->v0.runlist, 0); in nvkm_ucgrp_new() 99 if (!runl) in nvkm_ucgrp_new() 115 ret = nvkm_cgrp_new(runl, args->v0.name, vmm, true, &ucgrp->cgrp); in nvkm_ucgrp_new()
|
A D | uchan.c | 45 struct nvkm_runl *runl = chan->cgrp->runl; in nvkm_uchan_uevent() local 55 return nvkm_uevent_add(uevent, &runl->fifo->nonstall.event, 0, in nvkm_uchan_uevent() 58 return nvkm_uevent_add(uevent, &runl->chid->event, chan->id, in nvkm_uchan_uevent() 164 engn = nvkm_runl_find_engn(engn, cgrp->runl, engn->engine == oclass->engine); in nvkm_uchan_object_new() 210 nvkm_runl_foreach_engn(engn, chan->cgrp->runl) { in nvkm_uchan_sclass() 215 if (engn->runl->func->runqs) { in nvkm_uchan_sclass() 259 struct nvkm_device *device = chan->cgrp->runl->fifo->engine.subdev.device; in nvkm_uchan_map() 325 struct nvkm_runl *runl; in nvkm_uchan_new() local 341 runl = nvkm_runl_get(fifo, args->v0.runlist, 0); in nvkm_uchan_new() 342 if (!runl) in nvkm_uchan_new() [all …]
|
A D | nv04.c | 43 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_chan_stop() 94 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_chan_start() 183 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_eobj_ramht_del() 194 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_eobj_ramht_add() 496 struct nvkm_runl *runl; in nv04_fifo_runl_ctor() local 498 runl = nvkm_runl_new(fifo, 0, 0, 0); in nv04_fifo_runl_ctor() 499 if (IS_ERR(runl)) in nv04_fifo_runl_ctor() 500 return PTR_ERR(runl); in nv04_fifo_runl_ctor() 502 nvkm_runl_add(runl, 0, fifo->func->engn_sw, NVKM_ENGINE_SW, 0); in nv04_fifo_runl_ctor() 504 nvkm_runl_add(runl, 1, fifo->func->engn , NVKM_ENGINE_GR, 0); in nv04_fifo_runl_ctor() [all …]
|
A D | gv100.c | 177 gv100_runl_preempt(struct nvkm_runl *runl) in gv100_runl_preempt() argument 179 nvkm_wr32(runl->fifo->engine.subdev.device, 0x002638, BIT(runl->id)); in gv100_runl_preempt() 458 struct nvkm_runl *runl; in gv100_fifo_intr_ctxsw_timeout() local 461 nvkm_runl_foreach(runl, fifo) { in gv100_fifo_intr_ctxsw_timeout() 462 nvkm_runl_foreach_engn_cond(engn, runl, engm & BIT(engn->id)) in gv100_fifo_intr_ctxsw_timeout() 463 nvkm_runl_rc_engn(runl, engn); in gv100_fifo_intr_ctxsw_timeout() 479 .runl = &gv100_runl,
|
A D | cgrp.h | 34 struct nvkm_runl *runl; member 71 #define CGRP_PRCLI(c,l,p,f,a...) RUNL_PRINT((c)->runl, l, p, "%04x:[%s]"f, (c)->id, (c)->name, ##a) 72 #define CGRP_PRINT(c,l,p,f,a...) RUNL_PRINT((c)->runl, l, p, "%04x:"f, (c)->id, ##a)
|
A D | nv40.c | 41 struct nvkm_memory *ramfc = chan->cgrp->runl->fifo->engine.subdev.device->imem->ramfc; in nv40_chan_ramfc_write() 113 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv40_eobj_ramht_add() 127 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv40_ectx_bind() 240 .runl = &nv04_runl,
|
A D | nv10.c | 39 struct nvkm_memory *ramfc = chan->cgrp->runl->fifo->engine.subdev.device->imem->ramfc; in nv10_chan_ramfc_write() 101 .runl = &nv04_runl,
|
A D | gk110.c | 63 nvkm_wr32(cgrp->runl->fifo->engine.subdev.device, 0x002634, 0x01000000 | cgrp->id); in gk110_cgrp_preempt() 119 .runl = &gk110_runl,
|
A D | nv17.c | 40 struct nvkm_memory *ramfc = chan->cgrp->runl->fifo->engine.subdev.device->imem->ramfc; in nv17_chan_ramfc_write() 130 .runl = &nv04_runl,
|
A D | ga102.c | 32 .runl = &ga100_runl,
|
A D | gk20a.c | 39 .runl = &gk110_runl,
|
A D | gm200.c | 53 .runl = &gm107_runl,
|
/linux-6.3-rc2/drivers/gpu/drm/nouveau/ |
A D | nouveau_chan.c | 517 kfree(drm->runl); in nouveau_channels_fini() 546 drm->runl = kcalloc(drm->runl_nr, sizeof(*drm->runl), GFP_KERNEL); in nouveau_channels_init() 547 if (!drm->runl) in nouveau_channels_init() 562 drm->runl[i].chan_nr = args.v.channels.data; in nouveau_channels_init() 563 drm->runl[i].chan_id_base = drm->chan_total; in nouveau_channels_init() 564 drm->runl[i].context_base = dma_fence_context_alloc(drm->runl[i].chan_nr); in nouveau_channels_init() 566 drm->chan_total += drm->runl[i].chan_nr; in nouveau_channels_init() 569 drm->runl[0].context_base = dma_fence_context_alloc(drm->chan_nr); in nouveau_channels_init() 571 drm->runl[i].context_base = drm->runl[0].context_base; in nouveau_channels_init()
|