drm/nouveau/gr/gf100-: handle GPC/TPC/MPC trap
authorBen Skeggs <bskeggs@redhat.com>
Sat, 10 Dec 2016 06:42:50 +0000 (16:42 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Dec 2016 01:40:08 +0000 (11:40 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

index b3d00ad..f65a5b0 100644 (file)
@@ -1041,6 +1041,13 @@ gf100_gr_trap_tpc(struct gf100_gr *gr, int gpc, int tpc)
                stat &= ~0x00000008;
        }
 
+       if (stat & 0x00000010) {
+               u32 trap = nvkm_rd32(device, TPC_UNIT(gpc, tpc, 0x0430));
+               nvkm_error(subdev, "GPC%d/TPC%d/MPC: %08x\n", gpc, tpc, trap);
+               nvkm_wr32(device, TPC_UNIT(gpc, tpc, 0x0430), 0xc0000000);
+               stat &= ~0x00000010;
+       }
+
        if (stat) {
                nvkm_error(subdev, "GPC%d/TPC%d/%08x: unknown\n", gpc, tpc, stat);
        }