]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/nouveau/fifo/tu102: rename implementation from tu104
authorBen Skeggs <bskeggs@redhat.com>
Thu, 17 Jan 2019 02:11:47 +0000 (12:11 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 19 Feb 2019 22:59:58 +0000 (08:59 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu104.c [deleted file]
drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu104.c [deleted file]
drivers/gpu/drm/nouveau/nvkm/engine/fifo/user.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/usertu102.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/engine/fifo/usertu104.c [deleted file]

index 3b2b685778eb15d57310fabd0a690b6a27cd0610..b7fc04dd1628a7a4a764ebd486a3d13943c094d1 100644 (file)
@@ -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 gp10b_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
index 856f5a2c3a4b399ac7c834f88caa8b7c34971565..11a6013a999e504a55c4ee5e1c0799a7987bc46c 100644 (file)
@@ -2463,7 +2463,7 @@ nv162_chipset = {
        .ce[4] = tu104_ce_new,
        .disp = tu102_disp_new,
        .dma = gv100_dma_new,
-       .fifo = tu104_fifo_new,
+       .fifo = tu102_fifo_new,
 };
 
 static const struct nvkm_device_chip
@@ -2495,7 +2495,7 @@ nv164_chipset = {
        .ce[4] = tu104_ce_new,
        .disp = tu102_disp_new,
        .dma = gv100_dma_new,
-       .fifo = tu104_fifo_new,
+       .fifo = tu102_fifo_new,
 };
 
 static const struct nvkm_device_chip
@@ -2527,7 +2527,7 @@ nv166_chipset = {
        .ce[4] = tu104_ce_new,
        .disp = tu102_disp_new,
        .dma = gv100_dma_new,
-       .fifo = tu104_fifo_new,
+       .fifo = tu102_fifo_new,
 };
 
 static int
index 87d8e054e40ae4d8ff3ab30d870363b0e28afbeb..05aada541ea55659b82723fda4e1c01bfa9b0966 100644 (file)
@@ -16,7 +16,7 @@ nvkm-y += nvkm/engine/fifo/gm20b.o
 nvkm-y += nvkm/engine/fifo/gp100.o
 nvkm-y += nvkm/engine/fifo/gp10b.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/channv50.o
@@ -34,7 +34,7 @@ nvkm-y += nvkm/engine/fifo/gpfifog84.o
 nvkm-y += nvkm/engine/fifo/gpfifogf100.o
 nvkm-y += nvkm/engine/fifo/gpfifogk104.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/usertu104.o
+nvkm-y += nvkm/engine/fifo/usertu102.o
index a14545d871d8efc2c3d352d567ef618d3c3ff8b5..f8557cdfbd81f19961720f07b09f57c7c255b126 100644 (file)
@@ -47,6 +47,6 @@ int gv100_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *,
 int gv100_fifo_gpfifo_engine_fini(struct nvkm_fifo_chan *,
                                  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 **);
 #endif
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c
new file mode 100644 (file)
index 0000000..abef7fb
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2018 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include "changk104.h"
+#include "cgrp.h"
+
+#include <core/client.h>
+#include <core/gpuobj.h>
+
+#include <nvif/clc36f.h>
+#include <nvif/unpack.h>
+
+static u32
+tu102_fifo_gpfifo_submit_token(struct nvkm_fifo_chan *base)
+{
+       struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
+       return (chan->runl << 16) | chan->base.chid;
+}
+
+static const struct nvkm_fifo_chan_func
+tu102_fifo_gpfifo = {
+       .dtor = gk104_fifo_gpfifo_dtor,
+       .init = gk104_fifo_gpfifo_init,
+       .fini = gk104_fifo_gpfifo_fini,
+       .ntfy = gf100_fifo_chan_ntfy,
+       .engine_ctor = gk104_fifo_gpfifo_engine_ctor,
+       .engine_dtor = gk104_fifo_gpfifo_engine_dtor,
+       .engine_init = gv100_fifo_gpfifo_engine_init,
+       .engine_fini = gv100_fifo_gpfifo_engine_fini,
+       .submit_token = tu102_fifo_gpfifo_submit_token,
+};
+
+int
+tu102_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass,
+                     void *data, u32 size, struct nvkm_object **pobject)
+{
+       struct nvkm_object *parent = oclass->parent;
+       union {
+               struct volta_channel_gpfifo_a_v0 v0;
+       } *args = data;
+       int ret = -ENOSYS;
+
+       nvif_ioctl(parent, "create channel gpfifo size %d\n", size);
+       if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) {
+               nvif_ioctl(parent, "create channel gpfifo vers %d vmm %llx "
+                                  "ioffset %016llx ilength %08x "
+                                  "runlist %016llx priv %d\n",
+                          args->v0.version, args->v0.vmm, args->v0.ioffset,
+                          args->v0.ilength, args->v0.runlist, args->v0.priv);
+               if (args->v0.priv && !oclass->client->super)
+                       return -EINVAL;
+               return gv100_fifo_gpfifo_new_(&tu102_fifo_gpfifo, fifo,
+                                             &args->v0.runlist,
+                                             &args->v0.chid,
+                                              args->v0.vmm,
+                                              args->v0.ioffset,
+                                              args->v0.ilength,
+                                             &args->v0.inst,
+                                              args->v0.priv,
+                                             &args->v0.token,
+                                             oclass, pobject);
+       }
+
+       return ret;
+}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu104.c
deleted file mode 100644 (file)
index ff70484..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2018 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-#include "changk104.h"
-#include "cgrp.h"
-
-#include <core/client.h>
-#include <core/gpuobj.h>
-
-#include <nvif/clc36f.h>
-#include <nvif/unpack.h>
-
-static u32
-tu104_fifo_gpfifo_submit_token(struct nvkm_fifo_chan *base)
-{
-       struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
-       return (chan->runl << 16) | chan->base.chid;
-}
-
-static const struct nvkm_fifo_chan_func
-tu104_fifo_gpfifo = {
-       .dtor = gk104_fifo_gpfifo_dtor,
-       .init = gk104_fifo_gpfifo_init,
-       .fini = gk104_fifo_gpfifo_fini,
-       .ntfy = gf100_fifo_chan_ntfy,
-       .engine_ctor = gk104_fifo_gpfifo_engine_ctor,
-       .engine_dtor = gk104_fifo_gpfifo_engine_dtor,
-       .engine_init = gv100_fifo_gpfifo_engine_init,
-       .engine_fini = gv100_fifo_gpfifo_engine_fini,
-       .submit_token = tu104_fifo_gpfifo_submit_token,
-};
-
-int
-tu104_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass,
-                     void *data, u32 size, struct nvkm_object **pobject)
-{
-       struct nvkm_object *parent = oclass->parent;
-       union {
-               struct volta_channel_gpfifo_a_v0 v0;
-       } *args = data;
-       int ret = -ENOSYS;
-
-       nvif_ioctl(parent, "create channel gpfifo size %d\n", size);
-       if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) {
-               nvif_ioctl(parent, "create channel gpfifo vers %d vmm %llx "
-                                  "ioffset %016llx ilength %08x "
-                                  "runlist %016llx priv %d\n",
-                          args->v0.version, args->v0.vmm, args->v0.ioffset,
-                          args->v0.ilength, args->v0.runlist, args->v0.priv);
-               if (args->v0.priv && !oclass->client->super)
-                       return -EINVAL;
-               return gv100_fifo_gpfifo_new_(&tu104_fifo_gpfifo, fifo,
-                                             &args->v0.runlist,
-                                             &args->v0.chid,
-                                              args->v0.vmm,
-                                              args->v0.ioffset,
-                                              args->v0.ilength,
-                                             &args->v0.inst,
-                                              args->v0.priv,
-                                             &args->v0.token,
-                                             oclass, pobject);
-       }
-
-       return ret;
-}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c
new file mode 100644 (file)
index 0000000..005f3e1
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2018 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include "gk104.h"
+#include "cgrp.h"
+#include "changk104.h"
+#include "user.h"
+
+#include <core/gpuobj.h>
+
+#include <nvif/class.h>
+
+static void
+tu102_fifo_runlist_commit(struct gk104_fifo *fifo, int runl,
+                         struct nvkm_memory *mem, int nr)
+{
+       struct nvkm_device *device = fifo->base.engine.subdev.device;
+       u64 addr = nvkm_memory_addr(mem);
+       /*XXX: target? */
+
+       nvkm_wr32(device, 0x002b00 + (runl * 0x10), lower_32_bits(addr));
+       nvkm_wr32(device, 0x002b04 + (runl * 0x10), upper_32_bits(addr));
+       nvkm_wr32(device, 0x002b08 + (runl * 0x10), nr);
+
+       /*XXX: how to wait? can you even wait? */
+}
+
+const struct gk104_fifo_runlist_func
+tu102_fifo_runlist = {
+       .size = 16,
+       .cgrp = gv100_fifo_runlist_cgrp,
+       .chan = gv100_fifo_runlist_chan,
+       .commit = tu102_fifo_runlist_commit,
+};
+
+static const struct nvkm_enum
+tu102_fifo_fault_engine[] = {
+       { 0x01, "DISPLAY" },
+       { 0x03, "PTP" },
+       { 0x06, "PWR_PMU" },
+       { 0x08, "IFB", NULL, NVKM_ENGINE_IFB },
+       { 0x09, "PERF" },
+       { 0x1f, "PHYSICAL" },
+       { 0x20, "HOST0" },
+       { 0x21, "HOST1" },
+       { 0x22, "HOST2" },
+       { 0x23, "HOST3" },
+       { 0x24, "HOST4" },
+       { 0x25, "HOST5" },
+       { 0x26, "HOST6" },
+       { 0x27, "HOST7" },
+       { 0x28, "HOST8" },
+       { 0x29, "HOST9" },
+       { 0x2a, "HOST10" },
+       { 0x2b, "HOST11" },
+       { 0x2c, "HOST12" },
+       { 0x2d, "HOST13" },
+       { 0x2e, "HOST14" },
+       { 0x80, "BAR1", NULL, NVKM_SUBDEV_BAR },
+       { 0xc0, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
+       {}
+};
+
+static void
+tu102_fifo_pbdma_init(struct gk104_fifo *fifo)
+{
+       struct nvkm_device *device = fifo->base.engine.subdev.device;
+       const u32 mask = (1 << fifo->pbdma_nr) - 1;
+       /*XXX: this is a bit of a guess at this point in time. */
+       nvkm_mask(device, 0xb65000, 0x80000fff, 0x80000000 | mask);
+}
+
+static const struct gk104_fifo_pbdma_func
+tu102_fifo_pbdma = {
+       .nr = gm200_fifo_pbdma_nr,
+       .init = tu102_fifo_pbdma_init,
+       .init_timeout = gk208_fifo_pbdma_init_timeout,
+};
+
+static const struct gk104_fifo_func
+tu102_fifo = {
+       .pbdma = &tu102_fifo_pbdma,
+       .fault.access = gv100_fifo_fault_access,
+       .fault.engine = tu102_fifo_fault_engine,
+       .fault.reason = gv100_fifo_fault_reason,
+       .fault.hubclient = gv100_fifo_fault_hubclient,
+       .fault.gpcclient = gv100_fifo_fault_gpcclient,
+       .runlist = &tu102_fifo_runlist,
+       .user = {{-1,-1,VOLTA_USERMODE_A       }, tu102_fifo_user_new   },
+       .chan = {{ 0, 0,TURING_CHANNEL_GPFIFO_A}, tu102_fifo_gpfifo_new },
+       .cgrp_force = true,
+};
+
+int
+tu102_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo)
+{
+       return gk104_fifo_new_(&tu102_fifo, device, index, 4096, pfifo);
+}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu104.c
deleted file mode 100644 (file)
index 98c8070..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2018 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-#include "gk104.h"
-#include "cgrp.h"
-#include "changk104.h"
-#include "user.h"
-
-#include <core/gpuobj.h>
-
-#include <nvif/class.h>
-
-static void
-tu104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl,
-                         struct nvkm_memory *mem, int nr)
-{
-       struct nvkm_device *device = fifo->base.engine.subdev.device;
-       u64 addr = nvkm_memory_addr(mem);
-       /*XXX: target? */
-
-       nvkm_wr32(device, 0x002b00 + (runl * 0x10), lower_32_bits(addr));
-       nvkm_wr32(device, 0x002b04 + (runl * 0x10), upper_32_bits(addr));
-       nvkm_wr32(device, 0x002b08 + (runl * 0x10), nr);
-
-       /*XXX: how to wait? can you even wait? */
-}
-
-const struct gk104_fifo_runlist_func
-tu104_fifo_runlist = {
-       .size = 16,
-       .cgrp = gv100_fifo_runlist_cgrp,
-       .chan = gv100_fifo_runlist_chan,
-       .commit = tu104_fifo_runlist_commit,
-};
-
-static const struct nvkm_enum
-tu104_fifo_fault_engine[] = {
-       { 0x01, "DISPLAY" },
-       { 0x03, "PTP" },
-       { 0x06, "PWR_PMU" },
-       { 0x08, "IFB", NULL, NVKM_ENGINE_IFB },
-       { 0x09, "PERF" },
-       { 0x1f, "PHYSICAL" },
-       { 0x20, "HOST0" },
-       { 0x21, "HOST1" },
-       { 0x22, "HOST2" },
-       { 0x23, "HOST3" },
-       { 0x24, "HOST4" },
-       { 0x25, "HOST5" },
-       { 0x26, "HOST6" },
-       { 0x27, "HOST7" },
-       { 0x28, "HOST8" },
-       { 0x29, "HOST9" },
-       { 0x2a, "HOST10" },
-       { 0x2b, "HOST11" },
-       { 0x2c, "HOST12" },
-       { 0x2d, "HOST13" },
-       { 0x2e, "HOST14" },
-       { 0x80, "BAR1", NULL, NVKM_SUBDEV_BAR },
-       { 0xc0, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
-       {}
-};
-
-static void
-tu104_fifo_pbdma_init(struct gk104_fifo *fifo)
-{
-       struct nvkm_device *device = fifo->base.engine.subdev.device;
-       const u32 mask = (1 << fifo->pbdma_nr) - 1;
-       /*XXX: this is a bit of a guess at this point in time. */
-       nvkm_mask(device, 0xb65000, 0x80000fff, 0x80000000 | mask);
-}
-
-static const struct gk104_fifo_pbdma_func
-tu104_fifo_pbdma = {
-       .nr = gm200_fifo_pbdma_nr,
-       .init = tu104_fifo_pbdma_init,
-       .init_timeout = gk208_fifo_pbdma_init_timeout,
-};
-
-static const struct gk104_fifo_func
-tu104_fifo = {
-       .pbdma = &tu104_fifo_pbdma,
-       .fault.access = gv100_fifo_fault_access,
-       .fault.engine = tu104_fifo_fault_engine,
-       .fault.reason = gv100_fifo_fault_reason,
-       .fault.hubclient = gv100_fifo_fault_hubclient,
-       .fault.gpcclient = gv100_fifo_fault_gpcclient,
-       .runlist = &tu104_fifo_runlist,
-       .user = {{-1,-1,VOLTA_USERMODE_A       }, tu104_fifo_user_new   },
-       .chan = {{ 0, 0,TURING_CHANNEL_GPFIFO_A}, tu104_fifo_gpfifo_new },
-       .cgrp_force = true,
-};
-
-int
-tu104_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo)
-{
-       return gk104_fifo_new_(&tu104_fifo, device, index, 4096, pfifo);
-}
index 14b0c6bde8ebbdfcef22fdca8a3ae4fc8fcffe21..54a3a3092cc09d817691b9a4c37f92a6d18806ab 100644 (file)
@@ -3,6 +3,6 @@
 #include "priv.h"
 int gv100_fifo_user_new(const struct nvkm_oclass *, void *, u32,
                        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 **);
 #endif
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/usertu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/usertu102.c
new file mode 100644 (file)
index 0000000..217268f
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2018 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include "user.h"
+
+static int
+tu102_fifo_user_map(struct nvkm_object *object, void *argv, u32 argc,
+                   enum nvkm_object_map *type, u64 *addr, u64 *size)
+{
+       struct nvkm_device *device = object->engine->subdev.device;
+       *addr = 0xbb0000 + device->func->resource_addr(device, 0);
+       *size = 0x010000;
+       *type = NVKM_OBJECT_MAP_IO;
+       return 0;
+}
+
+static const struct nvkm_object_func
+tu102_fifo_user = {
+       .map = tu102_fifo_user_map,
+};
+
+int
+tu102_fifo_user_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
+                   struct nvkm_object **pobject)
+{
+       return nvkm_object_new_(&tu102_fifo_user, oclass, argv, argc, pobject);
+}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/usertu104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/usertu104.c
deleted file mode 100644 (file)
index 8f98548..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2018 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-#include "user.h"
-
-static int
-tu104_fifo_user_map(struct nvkm_object *object, void *argv, u32 argc,
-                   enum nvkm_object_map *type, u64 *addr, u64 *size)
-{
-       struct nvkm_device *device = object->engine->subdev.device;
-       *addr = 0xbb0000 + device->func->resource_addr(device, 0);
-       *size = 0x010000;
-       *type = NVKM_OBJECT_MAP_IO;
-       return 0;
-}
-
-static const struct nvkm_object_func
-tu104_fifo_user = {
-       .map = tu104_fifo_user_map,
-};
-
-int
-tu104_fifo_user_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
-                   struct nvkm_object **pobject)
-{
-       return nvkm_object_new_(&tu104_fifo_user, oclass, argv, argc, pobject);
-}