drm/nouveau/gr/gf100-: virtualise trap_mp
authorBen Skeggs <bskeggs@redhat.com>
Tue, 8 May 2018 10:39:47 +0000 (20:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 05:01:25 +0000 (15:01 +1000)
Required to support Volta.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
20 files changed:
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp107.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp10b.c

index dd4a4104306c1aac55d5f3bba88c7199a86036fd..f05d9d4c6e5cc673eed56f8d43c68d70e393898f 100644 (file)
@@ -1010,7 +1010,7 @@ static const struct nvkm_bitfield gf100_mp_global_error[] = {
        {}
 };
 
-static void
+void
 gf100_gr_trap_mp(struct gf100_gr *gr, int gpc, int tpc)
 {
        struct nvkm_subdev *subdev = &gr->base.engine.subdev;
@@ -1046,7 +1046,7 @@ gf100_gr_trap_tpc(struct gf100_gr *gr, int gpc, int tpc)
        }
 
        if (stat & 0x00000002) {
-               gf100_gr_trap_mp(gr, gpc, tpc);
+               gr->func->trap_mp(gr, gpc, tpc);
                stat &= ~0x00000002;
        }
 
@@ -2176,6 +2176,7 @@ gf100_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gf100_gr_pack_mmio,
        .fecs.ucode = &gf100_gr_fecs_ucode,
        .gpccs.ucode = &gf100_gr_gpccs_ucode,
index 31109cec5a76476d472c5fa52703621e2eabf2ec..c25b93a0cb03db8a17b946cebaa61ecd65e04c0e 100644 (file)
@@ -145,6 +145,7 @@ struct gf100_gr_func {
        void (*init_504430)(struct gf100_gr *, int gpc, int tpc);
        void (*init_shader_exceptions)(struct gf100_gr *, int gpc, int tpc);
        void (*init_400054)(struct gf100_gr *);
+       void (*trap_mp)(struct gf100_gr *, int gpc, int tpc);
        void (*set_hww_esr_report_mask)(struct gf100_gr *);
        const struct gf100_gr_pack *mmio;
        struct {
@@ -301,6 +302,7 @@ extern const struct gf100_gr_init gf100_gr_init_be_0[];
 extern const struct gf100_gr_init gf100_gr_init_fe_1[];
 extern const struct gf100_gr_init gf100_gr_init_pe_1[];
 void gf100_gr_init_gpc_mmu(struct gf100_gr *);
+void gf100_gr_trap_mp(struct gf100_gr *, int, int);
 
 extern const struct gf100_gr_init gf104_gr_init_ds_0[];
 extern const struct gf100_gr_init gf104_gr_init_tex_0[];
index d5276cab7f7b67f6851f0c1192fad501f922e44d..df9cbed7ce5090e4a568fb3a024389126d2d9418 100644 (file)
@@ -126,6 +126,7 @@ gf104_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gf104_gr_pack_mmio,
        .fecs.ucode = &gf100_gr_fecs_ucode,
        .gpccs.ucode = &gf100_gr_gpccs_ucode,
index 8f22a311dccb70f4bbbfa0306ee8dd6fa578667c..8ffa0fd1134f4fbe86fcd54a53c0799740d94350 100644 (file)
@@ -124,6 +124,7 @@ gf108_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gf108_gr_pack_mmio,
        .fecs.ucode = &gf100_gr_fecs_ucode,
        .gpccs.ucode = &gf100_gr_gpccs_ucode,
index fcbfdc7e9b266e4f22808ad2af69e8a9367c0106..0d4293e3e4eae3a37d38af90ab7876bbb96485ae 100644 (file)
@@ -98,6 +98,7 @@ gf110_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gf110_gr_pack_mmio,
        .fecs.ucode = &gf100_gr_fecs_ucode,
        .gpccs.ucode = &gf100_gr_gpccs_ucode,
index f526ccddaf5edaac049edd8d37c353443cde5bb4..e3c1dbbfbf34d7827e4102b43eeb3ad95ee99249 100644 (file)
@@ -162,6 +162,7 @@ gf117_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gf117_gr_pack_mmio,
        .fecs.ucode = &gf117_gr_fecs_ucode,
        .gpccs.ucode = &gf117_gr_gpccs_ucode,
index 5d3d22fb5c86f76a52a7c4b36b7bedbf1c7b1b04..1ed70b93a10aa12a087c8014d1cd982a36b121f3 100644 (file)
@@ -189,6 +189,7 @@ gf119_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gf119_gr_pack_mmio,
        .fecs.ucode = &gf100_gr_fecs_ucode,
        .gpccs.ucode = &gf100_gr_gpccs_ucode,
index 2e5c48b61ac81375f220c865a90ce49fa22da71e..86819ab7f9a4df48ab01e61a46e20c3e8d0be86d 100644 (file)
@@ -462,6 +462,7 @@ gk104_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gk104_gr_pack_mmio,
        .fecs.ucode = &gk104_gr_fecs_ucode,
        .gpccs.ucode = &gk104_gr_gpccs_ucode,
index 9adb55f658c6493e9bc48c6b246aff86d762f2e7..e30d94ff23d7340cc2e4cefaeda9335c6bfb8b09 100644 (file)
@@ -364,6 +364,7 @@ gk110_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gk110_gr_pack_mmio,
        .fecs.ucode = &gk110_gr_fecs_ucode,
        .gpccs.ucode = &gk110_gr_gpccs_ucode,
index f848f1578cd3ea1b2c64db979a364239957003ee..253b98181ac4341aedb8900a8cb8e86d1c00d5e1 100644 (file)
@@ -116,6 +116,7 @@ gk110b_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gk110b_gr_pack_mmio,
        .fecs.ucode = &gk110_gr_fecs_ucode,
        .gpccs.ucode = &gk110_gr_gpccs_ucode,
index 9c678f17b2fe008cec707aa92313dd610e0e474f..702e9094c1c826a093f46d7d04a7c34fc8b531c8 100644 (file)
@@ -174,6 +174,7 @@ gk208_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_shader_exceptions = gf100_gr_init_shader_exceptions,
        .init_400054 = gf100_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gk208_gr_pack_mmio,
        .fecs.ucode = &gk208_gr_fecs_ucode,
        .gpccs.ucode = &gk208_gr_gpccs_ucode,
index a806643ede7e6d328394ca80d66570df54a8374e..95f7d859e63403c5f19e6fc199d4659e41b0b902 100644 (file)
@@ -285,6 +285,7 @@ gk20a_gr = {
        .init = gk20a_gr_init,
        .init_zcull = gf117_gr_init_zcull,
        .init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
+       .trap_mp = gf100_gr_trap_mp,
        .set_hww_esr_report_mask = gk20a_gr_set_hww_esr_report_mask,
        .rops = gf100_gr_rops,
        .ppc_nr = 1,
index c598fa5a68e036104b9f281411330ffcfb8a9b0d..d67bf9465baa5a67fa0b2ce17516dddb82cdf0dd 100644 (file)
@@ -407,6 +407,7 @@ gm107_gr = {
        .init_504430 = gm107_gr_init_504430,
        .init_shader_exceptions = gm107_gr_init_shader_exceptions,
        .init_400054 = gm107_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .mmio = gm107_gr_pack_mmio,
        .fecs.ucode = &gm107_gr_fecs_ucode,
        .gpccs.ucode = &gm107_gr_gpccs_ucode,
index ae0eaf8e6d71359a2b211f4eb3854d3773f0ec2a..03b255e9b81207e7e8e0882c4e446dc55491e000 100644 (file)
@@ -133,6 +133,7 @@ gm200_gr = {
        .init_504430 = gm107_gr_init_504430,
        .init_shader_exceptions = gm107_gr_init_shader_exceptions,
        .init_400054 = gm107_gr_init_400054,
+       .trap_mp = gf100_gr_trap_mp,
        .rops = gm200_gr_rops,
        .tpc_nr = 4,
        .ppc_nr = 2,
index fcf86d5cf26faa0044b401121c9393af3a73b04e..d2f9c7bf9f0379a2b799afdfcbc15d7358edd336 100644 (file)
@@ -68,6 +68,7 @@ gm20b_gr = {
        .init_zcull = gf117_gr_init_zcull,
        .init_gpc_mmu = gm20b_gr_init_gpc_mmu,
        .init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
+       .trap_mp = gf100_gr_trap_mp,
        .set_hww_esr_report_mask = gm20b_gr_set_hww_esr_report_mask,
        .rops = gm200_gr_rops,
        .ppc_nr = 1,
index 3addbc1d62c7ecbe598cbf593dffc5db6fcaf099..e5f941f81e074463c64f9ddfcbc1674cba8803ba 100644 (file)
@@ -79,6 +79,7 @@ gp100_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_504430 = gm107_gr_init_504430,
        .init_shader_exceptions = gp100_gr_init_shader_exceptions,
+       .trap_mp = gf100_gr_trap_mp,
        .rops = gm200_gr_rops,
        .gpc_nr = 6,
        .tpc_nr = 5,
index ea99c15487efca7f801081d2f3b9c8781436a8ab..09e2665e49885c03f938e16ab3d0118ff8d369c4 100644 (file)
@@ -57,6 +57,7 @@ gp102_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_504430 = gm107_gr_init_504430,
        .init_shader_exceptions = gp100_gr_init_shader_exceptions,
+       .trap_mp = gf100_gr_trap_mp,
        .rops = gm200_gr_rops,
        .gpc_nr = 6,
        .tpc_nr = 5,
index 289d8b272b42a6c09e88ecdb1bc1455245c61699..844fc9d63e5c588d2a17e08ef62e3bbf98291df3 100644 (file)
@@ -41,6 +41,7 @@ gp104_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_504430 = gm107_gr_init_504430,
        .init_shader_exceptions = gp100_gr_init_shader_exceptions,
+       .trap_mp = gf100_gr_trap_mp,
        .rops = gm200_gr_rops,
        .gpc_nr = 6,
        .tpc_nr = 5,
index 09cba537b8b9d85ecd29167c4186a05c216b1882..674385da3d43f2485a0079edb4e285b00a99664f 100644 (file)
@@ -43,6 +43,7 @@ gp107_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_504430 = gm107_gr_init_504430,
        .init_shader_exceptions = gp100_gr_init_shader_exceptions,
+       .trap_mp = gf100_gr_trap_mp,
        .rops = gm200_gr_rops,
        .gpc_nr = 2,
        .tpc_nr = 3,
index 4972bf8d253097da1846fdbd2b9da04111a9c10c..6103186a3724c1b9f9c4080b5c452109f608942e 100644 (file)
@@ -41,6 +41,7 @@ gp10b_gr = {
        .init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
        .init_504430 = gm107_gr_init_504430,
        .init_shader_exceptions = gp100_gr_init_shader_exceptions,
+       .trap_mp = gf100_gr_trap_mp,
        .rops = gm200_gr_rops,
        .gpc_nr = 1,
        .tpc_nr = 2,