Commit cb1e06e0 authored by Ben Skeggs's avatar Ben Skeggs

drm/nvf0/gr: initial register/context setup

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 507cd5b5
......@@ -62,6 +62,11 @@ chipsets:
.b16 #nve4_gpc_mmio_tail
.b16 #nve6_tpc_mmio_head
.b16 #nve6_tpc_mmio_tail
.b8 0xf0 0 0 0
.b16 #nvf0_gpc_mmio_head
.b16 #nvf0_gpc_mmio_tail
.b16 #nvf0_tpc_mmio_head
.b16 #nvf0_tpc_mmio_tail
.b8 0 0 0 0
// GPC mmio lists
......@@ -101,6 +106,37 @@ mmctx_data(0x0031d0, 1)
mmctx_data(0x0031e0, 2)
nve4_gpc_mmio_tail:
nvf0_gpc_mmio_head:
mmctx_data(0x000380, 1)
mmctx_data(0x000400, 2)
mmctx_data(0x00040c, 3)
mmctx_data(0x000450, 9)
mmctx_data(0x000600, 1)
mmctx_data(0x000684, 1)
mmctx_data(0x000700, 5)
mmctx_data(0x000800, 1)
mmctx_data(0x000808, 3)
mmctx_data(0x000828, 1)
mmctx_data(0x000830, 1)
mmctx_data(0x0008d8, 1)
mmctx_data(0x0008e0, 1)
mmctx_data(0x0008e8, 6)
mmctx_data(0x00091c, 1)
mmctx_data(0x000924, 3)
mmctx_data(0x000b00, 1)
mmctx_data(0x000b08, 6)
mmctx_data(0x000bb8, 1)
mmctx_data(0x000c08, 1)
mmctx_data(0x000c10, 8)
mmctx_data(0x000c40, 1)
mmctx_data(0x000c6c, 1)
mmctx_data(0x000c80, 1)
mmctx_data(0x000c8c, 1)
mmctx_data(0x000d24, 1)
mmctx_data(0x001000, 3)
mmctx_data(0x001014, 1)
nvf0_gpc_mmio_tail:
// TPC mmio lists
nve4_tpc_mmio_head:
mmctx_data(0x000048, 1)
......@@ -145,6 +181,29 @@ mmctx_data(0x000770, 1)
mmctx_data(0x000778, 2)
nve6_tpc_mmio_tail:
nvf0_tpc_mmio_head:
mmctx_data(0x000048, 1)
mmctx_data(0x000064, 1)
mmctx_data(0x000088, 1)
mmctx_data(0x000200, 6)
mmctx_data(0x00021c, 2)
mmctx_data(0x000230, 1)
mmctx_data(0x0002c4, 1)
mmctx_data(0x000400, 3)
mmctx_data(0x000420, 3)
mmctx_data(0x0004e8, 1)
mmctx_data(0x0004f4, 1)
mmctx_data(0x000604, 4)
mmctx_data(0x000644, 22)
mmctx_data(0x0006ac, 2)
mmctx_data(0x0006b8, 1)
mmctx_data(0x0006c8, 1)
mmctx_data(0x000730, 8)
mmctx_data(0x000758, 1)
mmctx_data(0x000770, 1)
mmctx_data(0x000778, 2)
nvf0_tpc_mmio_tail:
.section #nve0_grgpc_code
bra #init
define(`include_code')
......
......@@ -34,16 +34,19 @@ uint32_t nve0_grgpc_data[] = {
0x00000000,
/* 0x0064: chipsets */
0x000000e4,
0x0110008c,
0x01580110,
0x011c0098,
0x01d4018c,
0x000000e7,
0x0110008c,
0x01a40158,
0x011c0098,
0x022001d4,
0x000000e6,
0x0110008c,
0x01a40158,
0x011c0098,
0x022001d4,
0x000000f0,
0x018c011c,
0x02700220,
0x00000000,
/* 0x008c: nve4_gpc_mmio_head */
/* 0x0098: nve4_gpc_mmio_head */
0x00000380,
0x04000400,
0x0800040c,
......@@ -77,8 +80,38 @@ uint32_t nve0_grgpc_data[] = {
0x14003100,
0x000031d0,
0x040031e0,
/* 0x0110: nve4_gpc_mmio_tail */
/* 0x0110: nve4_tpc_mmio_head */
/* 0x011c: nve4_gpc_mmio_tail */
/* 0x011c: nvf0_gpc_mmio_head */
0x00000380,
0x04000400,
0x0800040c,
0x20000450,
0x00000600,
0x00000684,
0x10000700,
0x00000800,
0x08000808,
0x00000828,
0x00000830,
0x000008d8,
0x000008e0,
0x140008e8,
0x0000091c,
0x08000924,
0x00000b00,
0x14000b08,
0x00000bb8,
0x00000c08,
0x1c000c10,
0x00000c40,
0x00000c6c,
0x00000c80,
0x00000c8c,
0x00000d24,
0x08001000,
0x00001014,
/* 0x018c: nvf0_gpc_mmio_tail */
/* 0x018c: nve4_tpc_mmio_head */
0x00000048,
0x00000064,
0x00000088,
......@@ -97,8 +130,29 @@ uint32_t nve0_grgpc_data[] = {
0x1c000730,
0x00000758,
0x00000778,
/* 0x0158: nve4_tpc_mmio_tail */
/* 0x0158: nve6_tpc_mmio_head */
/* 0x01d4: nve4_tpc_mmio_tail */
/* 0x01d4: nve6_tpc_mmio_head */
0x00000048,
0x00000064,
0x00000088,
0x14000200,
0x0400021c,
0x00000230,
0x000002c4,
0x08000400,
0x08000420,
0x000004e8,
0x000004f4,
0x0c000604,
0x54000644,
0x040006ac,
0x000006c8,
0x1c000730,
0x00000758,
0x00000770,
0x04000778,
/* 0x0220: nve6_tpc_mmio_tail */
/* 0x0220: nvf0_tpc_mmio_head */
0x00000048,
0x00000064,
0x00000088,
......@@ -113,6 +167,7 @@ uint32_t nve0_grgpc_data[] = {
0x0c000604,
0x54000644,
0x040006ac,
0x000006b8,
0x000006c8,
0x1c000730,
0x00000758,
......
......@@ -37,6 +37,15 @@ hub_mmio_list_tail: .b32 0
ctx_current: .b32 0
.align 256
chan_data:
chan_mmio_count: .b32 0
chan_mmio_address: .b32 0
.align 256
xfer_data: .b32 0
.align 256
chipsets:
.b8 0xe4 0 0 0
.b16 #nve4_hub_mmio_head
......@@ -47,6 +56,9 @@ chipsets:
.b8 0xe6 0 0 0
.b16 #nve4_hub_mmio_head
.b16 #nve4_hub_mmio_tail
.b8 0xf0 0 0 0
.b16 #nvf0_hub_mmio_head
.b16 #nvf0_hub_mmio_tail
.b8 0 0 0 0
nve4_hub_mmio_head:
......@@ -103,13 +115,61 @@ mmctx_data(0x408900, 3)
mmctx_data(0x408980, 1)
nve4_hub_mmio_tail:
.align 256
chan_data:
chan_mmio_count: .b32 0
chan_mmio_address: .b32 0
.align 256
xfer_data: .b32 0
nvf0_hub_mmio_head:
mmctx_data(0x17e91c, 2)
mmctx_data(0x400204, 2)
mmctx_data(0x404004, 17)
mmctx_data(0x4040a8, 9)
mmctx_data(0x4040d0, 7)
mmctx_data(0x4040f8, 1)
mmctx_data(0x404100, 10)
mmctx_data(0x404130, 3)
mmctx_data(0x404150, 3)
mmctx_data(0x404164, 1)
mmctx_data(0x40417c, 2)
mmctx_data(0x4041a0, 4)
mmctx_data(0x404200, 4)
mmctx_data(0x404404, 12)
mmctx_data(0x404438, 1)
mmctx_data(0x404460, 4)
mmctx_data(0x404480, 1)
mmctx_data(0x404498, 1)
mmctx_data(0x404604, 4)
mmctx_data(0x404618, 4)
mmctx_data(0x40462c, 2)
mmctx_data(0x404640, 1)
mmctx_data(0x404654, 1)
mmctx_data(0x404660, 1)
mmctx_data(0x404678, 19)
mmctx_data(0x4046c8, 3)
mmctx_data(0x404700, 3)
mmctx_data(0x404718, 10)
mmctx_data(0x404744, 2)
mmctx_data(0x404754, 1)
mmctx_data(0x405800, 1)
mmctx_data(0x405830, 3)
mmctx_data(0x405854, 1)
mmctx_data(0x405870, 4)
mmctx_data(0x405a00, 2)
mmctx_data(0x405a18, 1)
mmctx_data(0x405b00, 1)
mmctx_data(0x405b10, 1)
mmctx_data(0x405b20, 1)
mmctx_data(0x406020, 1)
mmctx_data(0x406028, 4)
mmctx_data(0x4064a8, 5)
mmctx_data(0x4064c0, 12)
mmctx_data(0x4064fc, 1)
mmctx_data(0x407804, 1)
mmctx_data(0x40780c, 6)
mmctx_data(0x4078bc, 1)
mmctx_data(0x408000, 7)
mmctx_data(0x408064, 1)
mmctx_data(0x408800, 3)
mmctx_data(0x408840, 1)
mmctx_data(0x408900, 3)
mmctx_data(0x408980, 1)
nvf0_hub_mmio_tail:
.section #nve0_grhub_code
bra #init
......
......@@ -517,6 +517,13 @@ nve0_graph_init_unk40xx(struct nvc0_graph_priv *priv)
{
nv_wr32(priv, 0x40415c, 0x00000000);
nv_wr32(priv, 0x404170, 0x00000000);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x4041b4, 0x00000000);
break;
default:
break;
}
}
static void
......@@ -551,7 +558,14 @@ nve0_graph_init_unk58xx(struct nvc0_graph_priv *priv)
{
nv_wr32(priv, 0x405844, 0x00ffffff);
nv_wr32(priv, 0x405850, 0x00000000);
nv_wr32(priv, 0x405900, 0x0000ff34);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x405900, 0x0000ff00);
break;
default:
nv_wr32(priv, 0x405900, 0x0000ff34);
break;
}
nv_wr32(priv, 0x405908, 0x00000000);
nv_wr32(priv, 0x405928, 0x00000000);
nv_wr32(priv, 0x40592c, 0x00000000);
......@@ -567,11 +581,26 @@ static void
nve0_graph_init_unk70xx(struct nvc0_graph_priv *priv)
{
nv_wr32(priv, 0x407010, 0x00000000);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x407040, 0x80440424);
nv_wr32(priv, 0x407048, 0x0000000a);
break;
default:
break;
}
}
static void
nve0_graph_init_unk5bxx(struct nvc0_graph_priv *priv)
{
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x505b44, 0x00000000);
break;
default:
break;
}
nv_wr32(priv, 0x405b50, 0x00000000);
}
......@@ -610,11 +639,25 @@ nve0_graph_init_gpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x418d00, 0x00000000);
nv_wr32(priv, 0x418d28, 0x00000000);
nv_wr32(priv, 0x418d2c, 0x00000000);
nv_wr32(priv, 0x418f00, 0x00000000);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x418f00, 0x00000400);
break;
default:
nv_wr32(priv, 0x418f00, 0x00000000);
break;
}
nv_wr32(priv, 0x418f08, 0x00000000);
nv_wr32(priv, 0x418f20, 0x00000000);
nv_wr32(priv, 0x418f24, 0x00000000);
nv_wr32(priv, 0x418e00, 0x00000060);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x418e00, 0x00000000);
break;
default:
nv_wr32(priv, 0x418e00, 0x00000060);
break;
}
nv_wr32(priv, 0x418e08, 0x00000000);
nv_wr32(priv, 0x418e1c, 0x00000000);
nv_wr32(priv, 0x418e20, 0x00000000);
......@@ -630,9 +673,24 @@ nve0_graph_init_tpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419ab0, 0x00000000);
nv_wr32(priv, 0x419ac8, 0x00000000);
nv_wr32(priv, 0x419ab8, 0x000000e7);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x419aec, 0x00000000);
break;
default:
break;
}
nv_wr32(priv, 0x419abc, 0x00000000);
nv_wr32(priv, 0x419ac0, 0x00000000);
nv_wr32(priv, 0x419ab4, 0x00000000);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x419aa8, 0x00000000);
nv_wr32(priv, 0x419aac, 0x00000000);
break;
default:
break;
}
nv_wr32(priv, 0x41980c, 0x00000010);
nv_wr32(priv, 0x419844, 0x00000000);
nv_wr32(priv, 0x419850, 0x00000004);
......@@ -644,23 +702,59 @@ nve0_graph_init_tpc(struct nvc0_graph_priv *priv)
nv_wr32(priv, 0x419cb4, 0x00000000);
nv_wr32(priv, 0x419cb8, 0x00b08bea);
nv_wr32(priv, 0x419c84, 0x00010384);
nv_wr32(priv, 0x419cbc, 0x28137646);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x419cbc, 0x281b3646);
break;
default:
nv_wr32(priv, 0x419cbc, 0x28137646);
break;
}
nv_wr32(priv, 0x419cc0, 0x00000000);
nv_wr32(priv, 0x419cc4, 0x00000000);
nv_wr32(priv, 0x419c80, 0x00020232);
nv_wr32(priv, 0x419c0c, 0x00000000);
nv_wr32(priv, 0x419e00, 0x00000000);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x419c80, 0x00020230);
nv_wr32(priv, 0x419ccc, 0x00000000);
nv_wr32(priv, 0x419cd0, 0x00000000);
nv_wr32(priv, 0x419c0c, 0x00000000);
nv_wr32(priv, 0x419e00, 0x00000080);
break;
default:
nv_wr32(priv, 0x419c80, 0x00020232);
nv_wr32(priv, 0x419c0c, 0x00000000);
nv_wr32(priv, 0x419e00, 0x00000000);
break;
}
nv_wr32(priv, 0x419ea0, 0x00000000);
nv_wr32(priv, 0x419ee4, 0x00000000);
nv_wr32(priv, 0x419ea4, 0x00000100);
nv_wr32(priv, 0x419ea8, 0x00000000);
nv_wr32(priv, 0x419eb4, 0x00000000);
nv_wr32(priv, 0x419eb8, 0x00000000);
switch (nv_device(priv)->chipset) {
case 0xf0:
break;
default:
nv_wr32(priv, 0x419eb8, 0x00000000);
break;
}
nv_wr32(priv, 0x419ebc, 0x00000000);
nv_wr32(priv, 0x419ec0, 0x00000000);
nv_wr32(priv, 0x419edc, 0x00000000);
nv_wr32(priv, 0x419f00, 0x00000000);
nv_wr32(priv, 0x419f74, 0x00000555);
switch (nv_device(priv)->chipset) {
case 0xf0:
nv_wr32(priv, 0x419ed0, 0x00003234);
nv_wr32(priv, 0x419f74, 0x00015555);
nv_wr32(priv, 0x419f80, 0x00000000);
nv_wr32(priv, 0x419f84, 0x00000000);
nv_wr32(priv, 0x419f88, 0x00000000);
nv_wr32(priv, 0x419f8c, 0x00000000);
break;
default:
nv_wr32(priv, 0x419f74, 0x00000555);
break;
}
}
static void
......@@ -726,6 +820,7 @@ nve0_graph_init_units(struct nvc0_graph_priv *priv)
switch (nv_device(priv)->chipset) {
case 0xe7:
case 0xe6:
case 0xf0:
nv_wr32(priv, 0x407020, 0x40000000);
break;
default:
......@@ -971,6 +1066,7 @@ nve0_graph_init(struct nouveau_object *object)
switch (nv_device(priv)->chipset) {
case 0xe7:
case 0xe6:
case 0xf0:
nve0_graph_init_unk40xx(priv);
nve0_graph_init_unk44xx(priv);
nve0_graph_init_unk78xx(priv);
......
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