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 dd4a410..f05d9d4 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 31109ce..c25b93a 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 d5276ca..df9cbed 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 8f22a31..8ffa0fd 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 fcbfdc7..0d4293e 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 f526ccd..e3c1dbb 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 5d3d22f..1ed70b9 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 2e5c48b..86819ab 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 9adb55f..e30d94f 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 f848f15..253b981 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 9c678f1..702e909 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 a806643..95f7d85 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 c598fa5..d67bf94 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 ae0eaf8..03b255e 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 fcf86d5..d2f9c7b 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 3addbc1..e5f941f 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 ea99c15..09e2665 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 289d8b2..844fc9d 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 09cba53..674385d 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 4972bf8..6103186 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,