Commit 3d8a6ed2 authored by Ben Skeggs's avatar Ben Skeggs

drm/nve0/gr: s/tp/tpc/

NVIDIA's name...
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 8d6f585d
...@@ -121,13 +121,13 @@ static const struct nouveau_enum nve0_sked_error[] = { ...@@ -121,13 +121,13 @@ static const struct nouveau_enum nve0_sked_error[] = {
}; };
static void static void
nve0_graph_mp_trap(struct nvc0_graph_priv *priv, int gpc, int tp) nve0_graph_mp_trap(struct nvc0_graph_priv *priv, int gpc, int tpc)
{ {
u32 werr = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x648));
u32 gerr = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x650));
int i; int i;
u32 werr = nv_rd32(priv, TPC_UNIT(gpc, tp, 0x648));
u32 gerr = nv_rd32(priv, TPC_UNIT(gpc, tp, 0x650));
nv_error(priv, "GPC%i/TP%i/MP trap:", gpc, tp); nv_error(priv, "GPC%i/TPC%i/MP trap:", gpc, tpc);
for (i = 0; i <= 31; ++i) { for (i = 0; i <= 31; ++i) {
if (!(gerr & (1 << i))) if (!(gerr & (1 << i)))
...@@ -135,6 +135,7 @@ nve0_graph_mp_trap(struct nvc0_graph_priv *priv, int gpc, int tp) ...@@ -135,6 +135,7 @@ nve0_graph_mp_trap(struct nvc0_graph_priv *priv, int gpc, int tp)
pr_cont(" "); pr_cont(" ");
nouveau_enum_print(nve0_mp_global_error, i); nouveau_enum_print(nve0_mp_global_error, i);
} }
if (werr) { if (werr) {
pr_cont(" "); pr_cont(" ");
nouveau_enum_print(nve0_mp_warp_error, werr & 0xffff); nouveau_enum_print(nve0_mp_warp_error, werr & 0xffff);
...@@ -142,51 +143,51 @@ nve0_graph_mp_trap(struct nvc0_graph_priv *priv, int gpc, int tp) ...@@ -142,51 +143,51 @@ nve0_graph_mp_trap(struct nvc0_graph_priv *priv, int gpc, int tp)
pr_cont("\n"); pr_cont("\n");
/* disable MP trap to avoid spam */ /* disable MP trap to avoid spam */
nv_mask(priv, TPC_UNIT(gpc, tp, 0x50c), 0x2, 0x0); nv_mask(priv, TPC_UNIT(gpc, tpc, 0x50c), 0x2, 0x0);
/* TODO: figure out how to resume after an MP trap */ /* TODO: figure out how to resume after an MP trap */
} }
static void static void
nve0_graph_tp_trap(struct nvc0_graph_priv *priv, int gpc, int tp) nve0_graph_tpc_trap(struct nvc0_graph_priv *priv, int gpc, int tpc)
{ {
u32 stat = nv_rd32(priv, TPC_UNIT(gpc, tp, 0x508)); u32 stat = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x508));
if (stat & 0x1) { if (stat & 0x1) {
u32 trap = nv_rd32(priv, TPC_UNIT(gpc, tp, 0x224)); u32 trap = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x224));
nv_error(priv, "GPC%i/TP%i/TEX trap: %08x\n", nv_error(priv, "GPC%i/TPC%i/TEX trap: %08x\n",
gpc, tp, trap); gpc, tpc, trap);
nv_wr32(priv, TPC_UNIT(gpc, tp, 0x224), 0xc0000000); nv_wr32(priv, TPC_UNIT(gpc, tpc, 0x224), 0xc0000000);
stat &= ~0x1; stat &= ~0x1;
} }
if (stat & 0x2) { if (stat & 0x2) {
nve0_graph_mp_trap(priv, gpc, tp); nve0_graph_mp_trap(priv, gpc, tpc);
stat &= ~0x2; stat &= ~0x2;
} }
if (stat & 0x4) { if (stat & 0x4) {
u32 trap = nv_rd32(priv, TPC_UNIT(gpc, tp, 0x084)); u32 trap = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x084));
nv_error(priv, "GPC%i/TP%i/POLY trap: %08x\n", nv_error(priv, "GPC%i/TPC%i/POLY trap: %08x\n",
gpc, tp, trap); gpc, tpc, trap);
nv_wr32(priv, TPC_UNIT(gpc, tp, 0x084), 0xc0000000); nv_wr32(priv, TPC_UNIT(gpc, tpc, 0x084), 0xc0000000);
stat &= ~0x4; stat &= ~0x4;
} }
if (stat & 0x8) { if (stat & 0x8) {
u32 trap = nv_rd32(priv, TPC_UNIT(gpc, tp, 0x48c)); u32 trap = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x48c));
nv_error(priv, "GPC%i/TP%i/L1C trap: %08x\n", nv_error(priv, "GPC%i/TPC%i/L1C trap: %08x\n",
gpc, tp, trap); gpc, tpc, trap);
nv_wr32(priv, TPC_UNIT(gpc, tp, 0x48c), 0xc0000000); nv_wr32(priv, TPC_UNIT(gpc, tpc, 0x48c), 0xc0000000);
stat &= ~0x8; stat &= ~0x8;
} }
if (stat) { if (stat) {
nv_error(priv, "GPC%i/TP%i: unknown stat %08x\n", nv_error(priv, "GPC%i/TPC%i: unknown stat %08x\n",
gpc, tp, stat); gpc, tpc, stat);
} }
} }
...@@ -198,7 +199,7 @@ nve0_graph_gpc_trap(struct nvc0_graph_priv *priv) ...@@ -198,7 +199,7 @@ nve0_graph_gpc_trap(struct nvc0_graph_priv *priv)
for (gpc = 0; gpc < 4; ++gpc) { for (gpc = 0; gpc < 4; ++gpc) {
u32 stat; u32 stat;
int tp; int tpc;
if (!(mask & (1 << gpc))) if (!(mask & (1 << gpc)))
continue; continue;
...@@ -257,9 +258,9 @@ nve0_graph_gpc_trap(struct nvc0_graph_priv *priv) ...@@ -257,9 +258,9 @@ nve0_graph_gpc_trap(struct nvc0_graph_priv *priv)
stat &= ~0x0008; stat &= ~0x0008;
} }
for (tp = 0; tp < 8; ++tp) { for (tpc = 0; tpc < 8; ++tpc) {
if (stat & (1 << (16 + tp))) if (stat & (1 << (16 + tpc)))
nve0_graph_tp_trap(priv, gpc, tp); nve0_graph_tpc_trap(priv, gpc, tpc);
} }
stat &= ~0xff0000; stat &= ~0xff0000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment