Commit f10271ff authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/fifo/tu102: rename implementation from tu104

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 86037742
...@@ -74,5 +74,5 @@ int gm20b_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **); ...@@ -74,5 +74,5 @@ int gm20b_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
int gp100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **); int gp100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
int gp10b_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **); int gp10b_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
int gv100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **); int gv100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
int tu104_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **); int tu102_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
#endif #endif
...@@ -2463,7 +2463,7 @@ nv162_chipset = { ...@@ -2463,7 +2463,7 @@ nv162_chipset = {
.ce[4] = tu104_ce_new, .ce[4] = tu104_ce_new,
.disp = tu102_disp_new, .disp = tu102_disp_new,
.dma = gv100_dma_new, .dma = gv100_dma_new,
.fifo = tu104_fifo_new, .fifo = tu102_fifo_new,
}; };
static const struct nvkm_device_chip static const struct nvkm_device_chip
...@@ -2495,7 +2495,7 @@ nv164_chipset = { ...@@ -2495,7 +2495,7 @@ nv164_chipset = {
.ce[4] = tu104_ce_new, .ce[4] = tu104_ce_new,
.disp = tu102_disp_new, .disp = tu102_disp_new,
.dma = gv100_dma_new, .dma = gv100_dma_new,
.fifo = tu104_fifo_new, .fifo = tu102_fifo_new,
}; };
static const struct nvkm_device_chip static const struct nvkm_device_chip
...@@ -2527,7 +2527,7 @@ nv166_chipset = { ...@@ -2527,7 +2527,7 @@ nv166_chipset = {
.ce[4] = tu104_ce_new, .ce[4] = tu104_ce_new,
.disp = tu102_disp_new, .disp = tu102_disp_new,
.dma = gv100_dma_new, .dma = gv100_dma_new,
.fifo = tu104_fifo_new, .fifo = tu102_fifo_new,
}; };
static int static int
......
...@@ -16,7 +16,7 @@ nvkm-y += nvkm/engine/fifo/gm20b.o ...@@ -16,7 +16,7 @@ nvkm-y += nvkm/engine/fifo/gm20b.o
nvkm-y += nvkm/engine/fifo/gp100.o nvkm-y += nvkm/engine/fifo/gp100.o
nvkm-y += nvkm/engine/fifo/gp10b.o nvkm-y += nvkm/engine/fifo/gp10b.o
nvkm-y += nvkm/engine/fifo/gv100.o nvkm-y += nvkm/engine/fifo/gv100.o
nvkm-y += nvkm/engine/fifo/tu104.o nvkm-y += nvkm/engine/fifo/tu102.o
nvkm-y += nvkm/engine/fifo/chan.o nvkm-y += nvkm/engine/fifo/chan.o
nvkm-y += nvkm/engine/fifo/channv50.o nvkm-y += nvkm/engine/fifo/channv50.o
...@@ -34,7 +34,7 @@ nvkm-y += nvkm/engine/fifo/gpfifog84.o ...@@ -34,7 +34,7 @@ nvkm-y += nvkm/engine/fifo/gpfifog84.o
nvkm-y += nvkm/engine/fifo/gpfifogf100.o nvkm-y += nvkm/engine/fifo/gpfifogf100.o
nvkm-y += nvkm/engine/fifo/gpfifogk104.o nvkm-y += nvkm/engine/fifo/gpfifogk104.o
nvkm-y += nvkm/engine/fifo/gpfifogv100.o nvkm-y += nvkm/engine/fifo/gpfifogv100.o
nvkm-y += nvkm/engine/fifo/gpfifotu104.o nvkm-y += nvkm/engine/fifo/gpfifotu102.o
nvkm-y += nvkm/engine/fifo/usergv100.o nvkm-y += nvkm/engine/fifo/usergv100.o
nvkm-y += nvkm/engine/fifo/usertu104.o nvkm-y += nvkm/engine/fifo/usertu102.o
...@@ -47,6 +47,6 @@ int gv100_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *, ...@@ -47,6 +47,6 @@ int gv100_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *,
int gv100_fifo_gpfifo_engine_fini(struct nvkm_fifo_chan *, int gv100_fifo_gpfifo_engine_fini(struct nvkm_fifo_chan *,
struct nvkm_engine *, bool); struct nvkm_engine *, bool);
int tu104_fifo_gpfifo_new(struct gk104_fifo *, const struct nvkm_oclass *, int tu102_fifo_gpfifo_new(struct gk104_fifo *, const struct nvkm_oclass *,
void *data, u32 size, struct nvkm_object **); void *data, u32 size, struct nvkm_object **);
#endif #endif
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
#include <nvif/unpack.h> #include <nvif/unpack.h>
static u32 static u32
tu104_fifo_gpfifo_submit_token(struct nvkm_fifo_chan *base) tu102_fifo_gpfifo_submit_token(struct nvkm_fifo_chan *base)
{ {
struct gk104_fifo_chan *chan = gk104_fifo_chan(base); struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
return (chan->runl << 16) | chan->base.chid; return (chan->runl << 16) | chan->base.chid;
} }
static const struct nvkm_fifo_chan_func static const struct nvkm_fifo_chan_func
tu104_fifo_gpfifo = { tu102_fifo_gpfifo = {
.dtor = gk104_fifo_gpfifo_dtor, .dtor = gk104_fifo_gpfifo_dtor,
.init = gk104_fifo_gpfifo_init, .init = gk104_fifo_gpfifo_init,
.fini = gk104_fifo_gpfifo_fini, .fini = gk104_fifo_gpfifo_fini,
...@@ -45,11 +45,11 @@ tu104_fifo_gpfifo = { ...@@ -45,11 +45,11 @@ tu104_fifo_gpfifo = {
.engine_dtor = gk104_fifo_gpfifo_engine_dtor, .engine_dtor = gk104_fifo_gpfifo_engine_dtor,
.engine_init = gv100_fifo_gpfifo_engine_init, .engine_init = gv100_fifo_gpfifo_engine_init,
.engine_fini = gv100_fifo_gpfifo_engine_fini, .engine_fini = gv100_fifo_gpfifo_engine_fini,
.submit_token = tu104_fifo_gpfifo_submit_token, .submit_token = tu102_fifo_gpfifo_submit_token,
}; };
int int
tu104_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass, tu102_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass,
void *data, u32 size, struct nvkm_object **pobject) void *data, u32 size, struct nvkm_object **pobject)
{ {
struct nvkm_object *parent = oclass->parent; struct nvkm_object *parent = oclass->parent;
...@@ -67,7 +67,7 @@ tu104_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass, ...@@ -67,7 +67,7 @@ tu104_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass,
args->v0.ilength, args->v0.runlist, args->v0.priv); args->v0.ilength, args->v0.runlist, args->v0.priv);
if (args->v0.priv && !oclass->client->super) if (args->v0.priv && !oclass->client->super)
return -EINVAL; return -EINVAL;
return gv100_fifo_gpfifo_new_(&tu104_fifo_gpfifo, fifo, return gv100_fifo_gpfifo_new_(&tu102_fifo_gpfifo, fifo,
&args->v0.runlist, &args->v0.runlist,
&args->v0.chid, &args->v0.chid,
args->v0.vmm, args->v0.vmm,
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <nvif/class.h> #include <nvif/class.h>
static void static void
tu104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl, tu102_fifo_runlist_commit(struct gk104_fifo *fifo, int runl,
struct nvkm_memory *mem, int nr) struct nvkm_memory *mem, int nr)
{ {
struct nvkm_device *device = fifo->base.engine.subdev.device; struct nvkm_device *device = fifo->base.engine.subdev.device;
...@@ -44,15 +44,15 @@ tu104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl, ...@@ -44,15 +44,15 @@ tu104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl,
} }
const struct gk104_fifo_runlist_func const struct gk104_fifo_runlist_func
tu104_fifo_runlist = { tu102_fifo_runlist = {
.size = 16, .size = 16,
.cgrp = gv100_fifo_runlist_cgrp, .cgrp = gv100_fifo_runlist_cgrp,
.chan = gv100_fifo_runlist_chan, .chan = gv100_fifo_runlist_chan,
.commit = tu104_fifo_runlist_commit, .commit = tu102_fifo_runlist_commit,
}; };
static const struct nvkm_enum static const struct nvkm_enum
tu104_fifo_fault_engine[] = { tu102_fifo_fault_engine[] = {
{ 0x01, "DISPLAY" }, { 0x01, "DISPLAY" },
{ 0x03, "PTP" }, { 0x03, "PTP" },
{ 0x06, "PWR_PMU" }, { 0x06, "PWR_PMU" },
...@@ -80,7 +80,7 @@ tu104_fifo_fault_engine[] = { ...@@ -80,7 +80,7 @@ tu104_fifo_fault_engine[] = {
}; };
static void static void
tu104_fifo_pbdma_init(struct gk104_fifo *fifo) tu102_fifo_pbdma_init(struct gk104_fifo *fifo)
{ {
struct nvkm_device *device = fifo->base.engine.subdev.device; struct nvkm_device *device = fifo->base.engine.subdev.device;
const u32 mask = (1 << fifo->pbdma_nr) - 1; const u32 mask = (1 << fifo->pbdma_nr) - 1;
...@@ -89,28 +89,28 @@ tu104_fifo_pbdma_init(struct gk104_fifo *fifo) ...@@ -89,28 +89,28 @@ tu104_fifo_pbdma_init(struct gk104_fifo *fifo)
} }
static const struct gk104_fifo_pbdma_func static const struct gk104_fifo_pbdma_func
tu104_fifo_pbdma = { tu102_fifo_pbdma = {
.nr = gm200_fifo_pbdma_nr, .nr = gm200_fifo_pbdma_nr,
.init = tu104_fifo_pbdma_init, .init = tu102_fifo_pbdma_init,
.init_timeout = gk208_fifo_pbdma_init_timeout, .init_timeout = gk208_fifo_pbdma_init_timeout,
}; };
static const struct gk104_fifo_func static const struct gk104_fifo_func
tu104_fifo = { tu102_fifo = {
.pbdma = &tu104_fifo_pbdma, .pbdma = &tu102_fifo_pbdma,
.fault.access = gv100_fifo_fault_access, .fault.access = gv100_fifo_fault_access,
.fault.engine = tu104_fifo_fault_engine, .fault.engine = tu102_fifo_fault_engine,
.fault.reason = gv100_fifo_fault_reason, .fault.reason = gv100_fifo_fault_reason,
.fault.hubclient = gv100_fifo_fault_hubclient, .fault.hubclient = gv100_fifo_fault_hubclient,
.fault.gpcclient = gv100_fifo_fault_gpcclient, .fault.gpcclient = gv100_fifo_fault_gpcclient,
.runlist = &tu104_fifo_runlist, .runlist = &tu102_fifo_runlist,
.user = {{-1,-1,VOLTA_USERMODE_A }, tu104_fifo_user_new }, .user = {{-1,-1,VOLTA_USERMODE_A }, tu102_fifo_user_new },
.chan = {{ 0, 0,TURING_CHANNEL_GPFIFO_A}, tu104_fifo_gpfifo_new }, .chan = {{ 0, 0,TURING_CHANNEL_GPFIFO_A}, tu102_fifo_gpfifo_new },
.cgrp_force = true, .cgrp_force = true,
}; };
int int
tu104_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo) tu102_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo)
{ {
return gk104_fifo_new_(&tu104_fifo, device, index, 4096, pfifo); return gk104_fifo_new_(&tu102_fifo, device, index, 4096, pfifo);
} }
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
#include "priv.h" #include "priv.h"
int gv100_fifo_user_new(const struct nvkm_oclass *, void *, u32, int gv100_fifo_user_new(const struct nvkm_oclass *, void *, u32,
struct nvkm_object **); struct nvkm_object **);
int tu104_fifo_user_new(const struct nvkm_oclass *, void *, u32, int tu102_fifo_user_new(const struct nvkm_oclass *, void *, u32,
struct nvkm_object **); struct nvkm_object **);
#endif #endif
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "user.h" #include "user.h"
static int static int
tu104_fifo_user_map(struct nvkm_object *object, void *argv, u32 argc, tu102_fifo_user_map(struct nvkm_object *object, void *argv, u32 argc,
enum nvkm_object_map *type, u64 *addr, u64 *size) enum nvkm_object_map *type, u64 *addr, u64 *size)
{ {
struct nvkm_device *device = object->engine->subdev.device; struct nvkm_device *device = object->engine->subdev.device;
...@@ -33,13 +33,13 @@ tu104_fifo_user_map(struct nvkm_object *object, void *argv, u32 argc, ...@@ -33,13 +33,13 @@ tu104_fifo_user_map(struct nvkm_object *object, void *argv, u32 argc,
} }
static const struct nvkm_object_func static const struct nvkm_object_func
tu104_fifo_user = { tu102_fifo_user = {
.map = tu104_fifo_user_map, .map = tu102_fifo_user_map,
}; };
int int
tu104_fifo_user_new(const struct nvkm_oclass *oclass, void *argv, u32 argc, tu102_fifo_user_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
struct nvkm_object **pobject) struct nvkm_object **pobject)
{ {
return nvkm_object_new_(&tu104_fifo_user, oclass, argv, argc, pobject); return nvkm_object_new_(&tu102_fifo_user, oclass, argv, argc, pobject);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment