Loading drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c +13 −0 Original line number Diff line number Diff line Loading @@ -211,11 +211,24 @@ nvkm_fifo_chan_child_new(const struct nvkm_oclass *oclass, void *data, u32 size, void nvkm_chan_cctx_bind(struct nvkm_chan *chan, struct nvkm_oproxy *oproxy, struct nvkm_cctx *cctx) { struct nvkm_cgrp *cgrp = chan->cgrp; struct nvkm_runl *runl = cgrp->runl; /* Prevent any channel in channel group from being rescheduled, kick them * off host and any engine(s) they're loaded on. */ if (cgrp->hw) nvkm_runl_block(runl); /* Update context pointer. */ if (cctx) nvkm_fifo_chan_child_init(nvkm_oproxy(oproxy->object)); else nvkm_fifo_chan_child_fini(nvkm_oproxy(oproxy->object), false); /* Resume normal operation. */ if (cgrp->hw) nvkm_runl_allow(runl); } void Loading drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c +14 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,18 @@ gf100_runq = { .intr_0_names = gf100_runq_intr_0_names, }; static void gf100_runl_allow(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, engm, 0x00000000); } static void gf100_runl_block(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, engm, engm); } static bool gf100_runl_pending(struct nvkm_runl *runl) { Loading Loading @@ -181,6 +193,8 @@ static const struct nvkm_runl_func gf100_runl = { .wait = nv50_runl_wait, .pending = gf100_runl_pending, .block = gf100_runl_block, .allow = gf100_runl_allow, }; static void Loading drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +14 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,18 @@ gk104_runq = { .intr_0_names = gk104_runq_intr_0_names, }; void gk104_runl_allow(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, BIT(runl->id), 0x00000000); } void gk104_runl_block(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, BIT(runl->id), BIT(runl->id)); } bool gk104_runl_pending(struct nvkm_runl *runl) { Loading Loading @@ -306,6 +318,8 @@ static const struct nvkm_runl_func gk104_runl = { .wait = nv50_runl_wait, .pending = gk104_runl_pending, .block = gk104_runl_block, .allow = gk104_runl_allow, }; int Loading drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,8 @@ const struct nvkm_runl_func gk110_runl = { .wait = nv50_runl_wait, .pending = gk104_runl_pending, .block = gk104_runl_block, .allow = gk104_runl_allow, }; int Loading drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ const struct nvkm_runl_func gm107_runl = { .wait = nv50_runl_wait, .pending = gk104_runl_pending, .block = gk104_runl_block, .allow = gk104_runl_allow, }; static const struct nvkm_enum Loading Loading
drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c +13 −0 Original line number Diff line number Diff line Loading @@ -211,11 +211,24 @@ nvkm_fifo_chan_child_new(const struct nvkm_oclass *oclass, void *data, u32 size, void nvkm_chan_cctx_bind(struct nvkm_chan *chan, struct nvkm_oproxy *oproxy, struct nvkm_cctx *cctx) { struct nvkm_cgrp *cgrp = chan->cgrp; struct nvkm_runl *runl = cgrp->runl; /* Prevent any channel in channel group from being rescheduled, kick them * off host and any engine(s) they're loaded on. */ if (cgrp->hw) nvkm_runl_block(runl); /* Update context pointer. */ if (cctx) nvkm_fifo_chan_child_init(nvkm_oproxy(oproxy->object)); else nvkm_fifo_chan_child_fini(nvkm_oproxy(oproxy->object), false); /* Resume normal operation. */ if (cgrp->hw) nvkm_runl_allow(runl); } void Loading
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c +14 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,18 @@ gf100_runq = { .intr_0_names = gf100_runq_intr_0_names, }; static void gf100_runl_allow(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, engm, 0x00000000); } static void gf100_runl_block(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, engm, engm); } static bool gf100_runl_pending(struct nvkm_runl *runl) { Loading Loading @@ -181,6 +193,8 @@ static const struct nvkm_runl_func gf100_runl = { .wait = nv50_runl_wait, .pending = gf100_runl_pending, .block = gf100_runl_block, .allow = gf100_runl_allow, }; static void Loading
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +14 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,18 @@ gk104_runq = { .intr_0_names = gk104_runq_intr_0_names, }; void gk104_runl_allow(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, BIT(runl->id), 0x00000000); } void gk104_runl_block(struct nvkm_runl *runl, u32 engm) { nvkm_mask(runl->fifo->engine.subdev.device, 0x002630, BIT(runl->id), BIT(runl->id)); } bool gk104_runl_pending(struct nvkm_runl *runl) { Loading Loading @@ -306,6 +318,8 @@ static const struct nvkm_runl_func gk104_runl = { .wait = nv50_runl_wait, .pending = gk104_runl_pending, .block = gk104_runl_block, .allow = gk104_runl_allow, }; int Loading
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,8 @@ const struct nvkm_runl_func gk110_runl = { .wait = nv50_runl_wait, .pending = gk104_runl_pending, .block = gk104_runl_block, .allow = gk104_runl_allow, }; int Loading
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ const struct nvkm_runl_func gm107_runl = { .wait = nv50_runl_wait, .pending = gk104_runl_pending, .block = gk104_runl_block, .allow = gk104_runl_allow, }; static const struct nvkm_enum Loading