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 e232cee1b83c47aefa1dd6768d056dc58d833525..1d70a5dc076220e3bcb4a8c5f6fcb82f48e0480d 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 a28f5d213d6e161faac552a7193aa286bc591815..79ae19b1db673c6b0f95b1f6115166597c549e84 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 0bd87a0b25e8a15c3c50890a5593e96110656cbc..49565faa854d06c72aff1259d182e1c7105004c1 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 32a8e3deb87d3e5e6d5574b7f4edee6088813c26..46736513bd11a5bbd228f41efd8ee93e9ce86f2f 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 69b201f29cd56826b4c7c76d4f5cdf6fba6dbed3..f137baed7a614250790d235c10fe47d4bfe5bf84 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 fac7be50376c7c02c83e9d6ec9c449415e3257a1..787e911d95996d85c5818c66b8bfd985717f5fa7 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 },
 };