drm/nouveau/fifo/gm107-: write instance address in channel runlist entry
authorBen Skeggs <bskeggs@redhat.com>
Tue, 8 May 2018 10:39:46 +0000 (20:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 05:01:22 +0000 (15:01 +1000)
RM does this for some reason.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c

index e232cee..1d70a5d 100644 (file)
@@ -92,5 +92,7 @@ void gk110_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *,
 void gk208_fifo_init_pbdma_timeout(struct gk104_fifo *);
 
 extern const struct nvkm_enum gm107_fifo_fault_engine[];
+extern const struct gk104_fifo_runlist_func gm107_fifo_runlist;
+
 extern const struct nvkm_enum gp100_fifo_fault_engine[];
 #endif
index a28f5d2..79ae19b 100644 (file)
 #include "gk104.h"
 #include "changk104.h"
 
+#include <core/gpuobj.h>
+
 #include <nvif/class.h>
 
+static void
+gm107_fifo_runlist_chan(struct gk104_fifo_chan *chan,
+                       struct nvkm_memory *memory, u32 offset)
+{
+       nvkm_wo32(memory, offset + 0, chan->base.chid);
+       nvkm_wo32(memory, offset + 4, chan->base.inst->addr >> 12);
+}
+
+const struct gk104_fifo_runlist_func
+gm107_fifo_runlist = {
+       .size = 8,
+       .cgrp = gk110_fifo_runlist_cgrp,
+       .chan = gm107_fifo_runlist_chan,
+};
+
 const struct nvkm_enum
 gm107_fifo_fault_engine[] = {
        { 0x01, "DISPLAY" },
@@ -57,7 +74,7 @@ gm107_fifo = {
        .fault.reason = gk104_fifo_fault_reason,
        .fault.hubclient = gk104_fifo_fault_hubclient,
        .fault.gpcclient = gk104_fifo_fault_gpcclient,
-       .runlist = &gk110_fifo_runlist,
+       .runlist = &gm107_fifo_runlist,
        .chan = {{0,0,KEPLER_CHANNEL_GPFIFO_B}, gk104_fifo_gpfifo_new },
 };
 
index 0bd87a0..49565fa 100644 (file)
@@ -34,7 +34,7 @@ gm200_fifo = {
        .fault.reason = gk104_fifo_fault_reason,
        .fault.hubclient = gk104_fifo_fault_hubclient,
        .fault.gpcclient = gk104_fifo_fault_gpcclient,
-       .runlist = &gk110_fifo_runlist,
+       .runlist = &gm107_fifo_runlist,
        .chan = {{0,0,MAXWELL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
 };
 
index 32a8e3d..4673651 100644 (file)
@@ -32,7 +32,7 @@ gm20b_fifo = {
        .fault.reason = gk104_fifo_fault_reason,
        .fault.hubclient = gk104_fifo_fault_hubclient,
        .fault.gpcclient = gk104_fifo_fault_gpcclient,
-       .runlist = &gk110_fifo_runlist,
+       .runlist = &gm107_fifo_runlist,
        .chan = {{0,0,MAXWELL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
 };
 
index 69b201f..f137bae 100644 (file)
@@ -58,7 +58,7 @@ gp100_fifo = {
        .fault.reason = gk104_fifo_fault_reason,
        .fault.hubclient = gk104_fifo_fault_hubclient,
        .fault.gpcclient = gk104_fifo_fault_gpcclient,
-       .runlist = &gk110_fifo_runlist,
+       .runlist = &gm107_fifo_runlist,
        .chan = {{0,0,PASCAL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
 };
 
index fac7be5..787e911 100644 (file)
@@ -32,7 +32,7 @@ gp10b_fifo = {
        .fault.reason = gk104_fifo_fault_reason,
        .fault.hubclient = gk104_fifo_fault_hubclient,
        .fault.gpcclient = gk104_fifo_fault_gpcclient,
-       .runlist = &gk110_fifo_runlist,
+       .runlist = &gm107_fifo_runlist,
        .chan = {{0,0,PASCAL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
 };