Skip to content

Commit

Permalink
drm/nvc3/gr: update initial register/context values
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Jul 1, 2013
1 parent d8b02db commit 8b637ae
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 12 deletions.
29 changes: 29 additions & 0 deletions drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,7 @@ nvc0_grctx_generate_9097(struct nvc0_graph_priv *priv)

switch (nv_device(priv)->chipset) {
case 0xc0:
case 0xc3:
case 0xd9:
case 0xd7:
break;
Expand Down Expand Up @@ -1473,6 +1474,7 @@ nvc0_grctx_generate_dispatch(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x40402c, 0x00000000);
break;
case 0xc0:
case 0xc3:
default:
break;
}
Expand All @@ -1493,6 +1495,7 @@ nvc0_grctx_generate_dispatch(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x4040c8, 0xf0000087);
switch (nv_device(priv)->chipset) {
case 0xc0:
case 0xc3:
case 0xd9:
case 0xd7:
nv_wr32(priv, 0x4040d0, 0x00000000);
Expand Down Expand Up @@ -1520,6 +1523,7 @@ nvc0_grctx_generate_dispatch(struct nvc0_graph_priv *priv)
case 0xd7:
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x404174, 0x00000000);
break;
Expand Down Expand Up @@ -1662,6 +1666,7 @@ nvc0_grctx_generate_shaders(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x405834, 0x08000000);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x405800, 0x078000bf);
nv_wr32(priv, 0x405830, 0x02180000);
Expand Down Expand Up @@ -1703,6 +1708,7 @@ nvc0_grctx_generate_unk64xx(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x4064bc, 0x00000000);
break;
case 0xc0:
case 0xc3:
default:
break;
}
Expand All @@ -1714,6 +1720,7 @@ nvc0_grctx_generate_unk64xx(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x4064c4, 0x0086ffff);
break;
case 0xc0:
case 0xc3:
default:
break;
}
Expand Down Expand Up @@ -1753,6 +1760,7 @@ nvc0_grctx_generate_rop(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x408804, 0x00000040);
switch (nv_device(priv)->chipset) {
case 0xc0:
case 0xc3:
nv_wr32(priv, 0x408808, 0x0003e00d);
nv_wr32(priv, 0x408900, 0x3080b801);
nv_wr32(priv, 0x408904, 0x02000001);
Expand Down Expand Up @@ -1797,6 +1805,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
case 0xd7:
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x418408, 0x00000000);
break;
Expand All @@ -1809,6 +1818,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x418414, 0x02200fff);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x418414, 0x00200fff);
break;
Expand All @@ -1833,6 +1843,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x41870c, 0x00000000);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x41870c, 0x07c80000);
break;
Expand All @@ -1844,6 +1855,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x418800, 0x7006860a);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x418800, 0x0006860a);
break;
Expand All @@ -1859,6 +1871,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x418830, 0x10000001);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x418830, 0x00000001);
break;
Expand All @@ -1879,6 +1892,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x4188fc, 0x20100008);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x4188fc, 0x00100000);
break;
Expand All @@ -1902,6 +1916,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x418b00, 0x00000006);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x418b00, 0x00000000);
break;
Expand Down Expand Up @@ -1929,6 +1944,7 @@ nvc0_grctx_generate_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x418c6c, 0x00000001);
break;
case 0xc0:
case 0xc3:
default:
break;
}
Expand All @@ -1954,6 +1970,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419864, 0x00000129);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x419864, 0x0000012a);
break;
Expand All @@ -1968,6 +1985,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
switch (nv_device(priv)->chipset) {
case 0xc0:
break;
case 0xc3:
default:
nv_wr32(priv, 0x419a1c, 0x00000000);
nv_wr32(priv, 0x419a20, 0x00000800);
Expand All @@ -1981,6 +1999,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
case 0xd7:
nv_wr32(priv, 0x00419ac4, 0x0017f440);
break;
case 0xc3:
default:
nv_wr32(priv, 0x00419ac4, 0x0007f440);
break;
Expand All @@ -1999,6 +2018,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419be0, 0x00400001);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x419be0, 0x00000001);
break;
Expand All @@ -2010,6 +2030,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419c00, 0x0000000a);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x419c00, 0x00000002);
break;
Expand All @@ -2018,6 +2039,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419c08, 0x00000002);
nv_wr32(priv, 0x419c20, 0x00000000);
switch (nv_device(priv)->chipset) {
case 0xc3:
case 0xce:
case 0xcf:
nv_wr32(priv, 0x419cb0, 0x00020048);
Expand All @@ -2042,6 +2064,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419d20, 0x12180000);
break;
case 0xc0:
case 0xc3:
default:
nv_wr32(priv, 0x419d20, 0x02180000);
break;
Expand All @@ -2054,6 +2077,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419d44, 0x02180218);
break;
case 0xc0:
case 0xc3:
default:
break;
}
Expand Down Expand Up @@ -2090,6 +2114,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
case 0xd7:
nv_wr32(priv, 0x419ee0, 0x00010110);
break;
case 0xc3:
default:
nv_wr32(priv, 0x419ee0, 0x00011110);
break;
Expand All @@ -2100,6 +2125,7 @@ nvc0_grctx_generate_tp(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419f50, 0x00000000);
nv_wr32(priv, 0x419f54, 0x00000000);
break;
case 0xc3:
case 0xd9:
case 0xd7:
nv_wr32(priv, 0x419f30, 0x00000000);
Expand Down Expand Up @@ -2436,6 +2462,7 @@ nvc0_grctx_generate(struct nvc0_graph_priv *priv)
nv_icmd(priv, i, 0x00000040);
break;
case 0xc0:
case 0xc3:
default:
break;
}
Expand All @@ -2454,6 +2481,7 @@ nvc0_grctx_generate(struct nvc0_graph_priv *priv)
nv_icmd(priv, i, 0x0000c080);
break;
case 0xc0:
case 0xc3:
break;
default:
break;
Expand Down Expand Up @@ -3282,6 +3310,7 @@ nvc0_grctx_generate(struct nvc0_graph_priv *priv)

switch (nv_device(priv)->chipset) {
case 0xc0:
case 0xc3:
nv_mthd(priv, 0x902d, 0x3410, 0x00000000);
break;
case 0xd9:
Expand Down
33 changes: 29 additions & 4 deletions drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ chipsets:
.b16 #nvc0_tpc_mmio_head
.b16 #nvc1_tpc_mmio_tail
.b8 0xc3 0 0 0
.b16 #nvc0_gpc_mmio_head
.b16 #nvc0_gpc_mmio_tail
.b16 #nvc0_tpc_mmio_head
.b16 #nvc3_tpc_mmio_tail
.b16 #nnvc0_gpc_mmio_head
.b16 #nnvc0_gpc_mmio_tail
.b16 #nnvc3_tpc_mmio_head
.b16 #nnvc3_tpc_mmio_tail
.b8 0xc4 0 0 0
.b16 #nvc0_gpc_mmio_head
.b16 #nvc0_gpc_mmio_tail
Expand Down Expand Up @@ -234,6 +234,31 @@ mmctx_data(0x000698, 1)
mmctx_data(0x000750, 2)
nnvc0_tpc_mmio_tail:

nnvc3_tpc_mmio_head:
mmctx_data(0x000018, 1)
mmctx_data(0x00003c, 1)
mmctx_data(0x000048, 1)
mmctx_data(0x000064, 1)
mmctx_data(0x000088, 1)
mmctx_data(0x000200, 6)
mmctx_data(0x00021c, 2)
mmctx_data(0x0002c4, 1)
mmctx_data(0x000300, 6)
mmctx_data(0x0003d0, 1)
mmctx_data(0x0003e0, 2)
mmctx_data(0x000400, 3)
mmctx_data(0x000420, 1)
mmctx_data(0x0004b0, 1)
mmctx_data(0x0004e8, 1)
mmctx_data(0x0004f4, 1)
mmctx_data(0x000520, 2)
mmctx_data(0x000604, 4)
mmctx_data(0x000644, 20)
mmctx_data(0x000698, 1)
mmctx_data(0x0006e0, 1)
mmctx_data(0x000730, 11)
nnvc3_tpc_mmio_tail:

nvd9_tpc_mmio_head:
mmctx_data(0x000018, 1)
mmctx_data(0x00003c, 1)
Expand Down
34 changes: 29 additions & 5 deletions drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ uint32_t nvc0_grgpc_data[] = {
0x013800d4,
0x02640200,
0x000000c3,
0x013400d4,
0x02600200,
0x01980138,
0x030802b0,
0x000000c4,
0x013400d4,
0x02600200,
Expand All @@ -56,10 +56,10 @@ uint32_t nvc0_grgpc_data[] = {
0x025c0200,
0x000000d9,
0x02000198,
0x030c02b0,
0x03640308,
0x000000d7,
0x02000198,
0x030c02b0,
0x03640308,
0x00000000,
/* 0x00d4: nvc0_gpc_mmio_head */
0x00000380,
Expand Down Expand Up @@ -194,7 +194,31 @@ uint32_t nvc0_grgpc_data[] = {
0x00000698,
0x04000750,
/* 0x02b0: nnvc0_tpc_mmio_tail */
/* 0x02b0: nvd9_tpc_mmio_head */
/* 0x02b0: nnvc3_tpc_mmio_head */
0x00000018,
0x0000003c,
0x00000048,
0x00000064,
0x00000088,
0x14000200,
0x0400021c,
0x000002c4,
0x14000300,
0x000003d0,
0x040003e0,
0x08000400,
0x00000420,
0x000004b0,
0x000004e8,
0x000004f4,
0x04000520,
0x0c000604,
0x4c000644,
0x00000698,
0x000006e0,
0x28000730,
/* 0x0308: nnvc3_tpc_mmio_tail */
/* 0x0308: nvd9_tpc_mmio_head */
0x00000018,
0x0000003c,
0x00000048,
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ chipsets:
.b16 #nvc0_hub_mmio_head
.b16 #nvc1_hub_mmio_tail
.b8 0xc3 0 0 0
.b16 #nvc0_hub_mmio_head
.b16 #nvc0_hub_mmio_tail
.b16 #nnvc0_hub_mmio_head
.b16 #nnvc0_hub_mmio_tail
.b8 0xc4 0 0 0
.b16 #nvc0_hub_mmio_head
.b16 #nvc0_hub_mmio_tail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ uint32_t nvc0_grhub_data[] = {
0x000000c1,
0x03ec034c,
0x000000c3,
0x03e8034c,
0x048803ec,
0x000000c4,
0x03e8034c,
0x000000c8,
Expand Down
Loading

0 comments on commit 8b637ae

Please sign in to comment.