Commit 06784090 authored by Ben Skeggs's avatar Ben Skeggs

drm/nvc0/gr: add initial support for nvd9, not quite there yet..

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent be7f2615
...@@ -655,6 +655,7 @@ nouveau_card_init(struct drm_device *dev) ...@@ -655,6 +655,7 @@ nouveau_card_init(struct drm_device *dev)
nv50_graph_create(dev); nv50_graph_create(dev);
break; break;
case NV_C0: case NV_C0:
case NV_D0:
nvc0_graph_create(dev); nvc0_graph_create(dev);
break; break;
default: default:
...@@ -1111,13 +1112,11 @@ int nouveau_load(struct drm_device *dev, unsigned long flags) ...@@ -1111,13 +1112,11 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
dev_priv->noaccel = !!nouveau_noaccel; dev_priv->noaccel = !!nouveau_noaccel;
if (nouveau_noaccel == -1) { if (nouveau_noaccel == -1) {
switch (dev_priv->chipset) { switch (dev_priv->chipset) {
#if 0 case 0xd9: /* known broken */
case 0xXX: /* known broken */
NV_INFO(dev, "acceleration disabled by default, pass " NV_INFO(dev, "acceleration disabled by default, pass "
"noaccel=0 to force enable\n"); "noaccel=0 to force enable\n");
dev_priv->noaccel = true; dev_priv->noaccel = true;
break; break;
#endif
default: default:
dev_priv->noaccel = false; dev_priv->noaccel = false;
break; break;
......
...@@ -875,14 +875,16 @@ nvc0_graph_create(struct drm_device *dev) ...@@ -875,14 +875,16 @@ nvc0_graph_create(struct drm_device *dev)
case 0xcf: /* 4/0/0/0, 3 */ case 0xcf: /* 4/0/0/0, 3 */
priv->magic_not_rop_nr = 0x03; priv->magic_not_rop_nr = 0x03;
break; break;
case 0xd9: /* 1/0/0/0, 1 */
priv->magic_not_rop_nr = 0x01;
break;
} }
if (!priv->magic_not_rop_nr) { if (!priv->magic_not_rop_nr) {
NV_ERROR(dev, "PGRAPH: unknown config: %d/%d/%d/%d, %d\n", NV_ERROR(dev, "PGRAPH: unknown config: %d/%d/%d/%d, %d\n",
priv->tp_nr[0], priv->tp_nr[1], priv->tp_nr[2], priv->tp_nr[0], priv->tp_nr[1], priv->tp_nr[2],
priv->tp_nr[3], priv->rop_nr); priv->tp_nr[3], priv->rop_nr);
/* use 0xc3's values... */ priv->magic_not_rop_nr = 0x00;
priv->magic_not_rop_nr = 0x03;
} }
NVOBJ_CLASS(dev, 0x902d, GR); /* 2D */ NVOBJ_CLASS(dev, 0x902d, GR); /* 2D */
......
...@@ -87,6 +87,7 @@ nvc0_graph_class(struct drm_device *dev) ...@@ -87,6 +87,7 @@ nvc0_graph_class(struct drm_device *dev)
case 0xc1: case 0xc1:
return 0x9197; return 0x9197;
case 0xc8: case 0xc8:
case 0xd9:
return 0x9297; return 0x9297;
default: default:
return 0; return 0;
......
This diff is collapsed.
...@@ -82,6 +82,11 @@ chipsets: ...@@ -82,6 +82,11 @@ chipsets:
.b16 #nvc0_gpc_mmio_tail .b16 #nvc0_gpc_mmio_tail
.b16 #nvc0_tpc_mmio_head .b16 #nvc0_tpc_mmio_head
.b16 #nvcf_tpc_mmio_tail .b16 #nvcf_tpc_mmio_tail
.b8 0xd9 0 0 0
.b16 #nvd9_gpc_mmio_head
.b16 #nvd9_gpc_mmio_tail
.b16 #nvd9_tpc_mmio_head
.b16 #nvd9_tpc_mmio_tail
.b8 0 0 0 0 .b8 0 0 0 0
// GPC mmio lists // GPC mmio lists
...@@ -114,6 +119,35 @@ nvc0_gpc_mmio_tail: ...@@ -114,6 +119,35 @@ nvc0_gpc_mmio_tail:
mmctx_data(0x000c6c, 1); mmctx_data(0x000c6c, 1);
nvc1_gpc_mmio_tail: nvc1_gpc_mmio_tail:
nvd9_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(0x000c6c, 1)
mmctx_data(0x000c80, 1)
mmctx_data(0x000c8c, 1)
mmctx_data(0x001000, 3)
mmctx_data(0x001014, 1)
nvd9_gpc_mmio_tail:
// TPC mmio lists // TPC mmio lists
nvc0_tpc_mmio_head: nvc0_tpc_mmio_head:
mmctx_data(0x000018, 1) mmctx_data(0x000018, 1)
...@@ -146,6 +180,31 @@ nvc3_tpc_mmio_tail: ...@@ -146,6 +180,31 @@ nvc3_tpc_mmio_tail:
mmctx_data(0x000544, 1) mmctx_data(0x000544, 1)
nvc1_tpc_mmio_tail: nvc1_tpc_mmio_tail:
nvd9_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, 3)
mmctx_data(0x0004b0, 1)
mmctx_data(0x0004e8, 1)
mmctx_data(0x0004f4, 1)
mmctx_data(0x000520, 2)
mmctx_data(0x000544, 1)
mmctx_data(0x000604, 4)
mmctx_data(0x000644, 20)
mmctx_data(0x000698, 1)
mmctx_data(0x0006e0, 1)
mmctx_data(0x000750, 3)
nvd9_tpc_mmio_tail:
.section #nvc0_grgpc_code .section #nvc0_grgpc_code
bra #init bra #init
......
...@@ -25,26 +25,29 @@ uint32_t nvc0_grgpc_data[] = { ...@@ -25,26 +25,29 @@ uint32_t nvc0_grgpc_data[] = {
0x00000000, 0x00000000,
0x00000000, 0x00000000,
0x000000c0, 0x000000c0,
0x011c00bc, 0x012800c8,
0x01700120, 0x01e40194,
0x000000c1, 0x000000c1,
0x012000bc, 0x012c00c8,
0x01840120, 0x01f80194,
0x000000c3, 0x000000c3,
0x011c00bc, 0x012800c8,
0x01800120, 0x01f40194,
0x000000c4, 0x000000c4,
0x011c00bc, 0x012800c8,
0x01800120, 0x01f40194,
0x000000c8, 0x000000c8,
0x011c00bc, 0x012800c8,
0x01700120, 0x01e40194,
0x000000ce, 0x000000ce,
0x011c00bc, 0x012800c8,
0x01800120, 0x01f40194,
0x000000cf, 0x000000cf,
0x011c00bc, 0x012800c8,
0x017c0120, 0x01f00194,
0x000000d9,
0x0194012c,
0x025401f8,
0x00000000, 0x00000000,
0x00000380, 0x00000380,
0x14000400, 0x14000400,
...@@ -71,6 +74,32 @@ uint32_t nvc0_grgpc_data[] = { ...@@ -71,6 +74,32 @@ uint32_t nvc0_grgpc_data[] = {
0x08001000, 0x08001000,
0x00001014, 0x00001014,
0x00000c6c, 0x00000c6c,
0x00000380,
0x04000400,
0x0800040c,
0x20000450,
0x00000600,
0x00000684,
0x10000700,
0x00000800,
0x08000808,
0x00000828,
0x00000830,
0x000008d8,
0x000008e0,
0x140008e8,
0x0000091c,
0x08000924,
0x00000b00,
0x14000b08,
0x00000bb8,
0x00000c08,
0x1c000c10,
0x00000c6c,
0x00000c80,
0x00000c8c,
0x08001000,
0x00001014,
0x00000018, 0x00000018,
0x0000003c, 0x0000003c,
0x00000048, 0x00000048,
...@@ -96,6 +125,29 @@ uint32_t nvc0_grgpc_data[] = { ...@@ -96,6 +125,29 @@ uint32_t nvc0_grgpc_data[] = {
0x000006e0, 0x000006e0,
0x000004bc, 0x000004bc,
0x00000544, 0x00000544,
0x00000018,
0x0000003c,
0x00000048,
0x00000064,
0x00000088,
0x14000200,
0x0400021c,
0x000002c4,
0x14000300,
0x000003d0,
0x040003e0,
0x08000400,
0x08000420,
0x000004b0,
0x000004e8,
0x000004f4,
0x04000520,
0x00000544,
0x0c000604,
0x4c000644,
0x00000698,
0x000006e0,
0x08000750,
}; };
uint32_t nvc0_grgpc_code[] = { uint32_t nvc0_grgpc_code[] = {
......
...@@ -59,6 +59,9 @@ chipsets: ...@@ -59,6 +59,9 @@ chipsets:
.b8 0xcf 0 0 0 .b8 0xcf 0 0 0
.b16 #nvc0_hub_mmio_head .b16 #nvc0_hub_mmio_head
.b16 #nvc0_hub_mmio_tail .b16 #nvc0_hub_mmio_tail
.b8 0xd9 0 0 0
.b16 #nvd9_hub_mmio_head
.b16 #nvd9_hub_mmio_tail
.b8 0 0 0 0 .b8 0 0 0 0
nvc0_hub_mmio_head: nvc0_hub_mmio_head:
...@@ -105,6 +108,48 @@ nvc0_hub_mmio_tail: ...@@ -105,6 +108,48 @@ nvc0_hub_mmio_tail:
mmctx_data(0x4064c0, 2) mmctx_data(0x4064c0, 2)
nvc1_hub_mmio_tail: nvc1_hub_mmio_tail:
nvd9_hub_mmio_head:
mmctx_data(0x17e91c, 2)
mmctx_data(0x400204, 2)
mmctx_data(0x404004, 10)
mmctx_data(0x404044, 1)
mmctx_data(0x404094, 14)
mmctx_data(0x4040d0, 7)
mmctx_data(0x4040f8, 1)
mmctx_data(0x404130, 3)
mmctx_data(0x404150, 3)
mmctx_data(0x404164, 2)
mmctx_data(0x404178, 2)
mmctx_data(0x404200, 8)
mmctx_data(0x404404, 14)
mmctx_data(0x404460, 4)
mmctx_data(0x404480, 1)
mmctx_data(0x404498, 1)
mmctx_data(0x404604, 4)
mmctx_data(0x404618, 32)
mmctx_data(0x404698, 21)
mmctx_data(0x4046f0, 2)
mmctx_data(0x404700, 22)
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(0x406020, 1)
mmctx_data(0x406028, 4)
mmctx_data(0x4064a8, 2)
mmctx_data(0x4064b4, 5)
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(0x408900, 4)
mmctx_data(0x408980, 1)
nvd9_hub_mmio_tail:
.align 256 .align 256
chan_data: chan_data:
chan_mmio_count: .b32 0 chan_mmio_count: .b32 0
......
...@@ -23,19 +23,21 @@ uint32_t nvc0_grhub_data[] = { ...@@ -23,19 +23,21 @@ uint32_t nvc0_grhub_data[] = {
0x00000000, 0x00000000,
0x00000000, 0x00000000,
0x000000c0, 0x000000c0,
0x01340098, 0x013c00a0,
0x000000c1, 0x000000c1,
0x01380098, 0x014000a0,
0x000000c3, 0x000000c3,
0x01340098, 0x013c00a0,
0x000000c4, 0x000000c4,
0x01340098, 0x013c00a0,
0x000000c8, 0x000000c8,
0x01340098, 0x013c00a0,
0x000000ce, 0x000000ce,
0x01340098, 0x013c00a0,
0x000000cf, 0x000000cf,
0x01340098, 0x013c00a0,
0x000000d9,
0x01dc0140,
0x00000000, 0x00000000,
0x0417e91c, 0x0417e91c,
0x04400204, 0x04400204,
...@@ -77,47 +79,45 @@ uint32_t nvc0_grhub_data[] = { ...@@ -77,47 +79,45 @@ uint32_t nvc0_grhub_data[] = {
0x0c408900, 0x0c408900,
0x00408980, 0x00408980,
0x044064c0, 0x044064c0,
0x00000000, 0x0417e91c,
0x00000000, 0x04400204,
0x00000000, 0x24404004,
0x00000000, 0x00404044,
0x00000000, 0x34404094,
0x00000000, 0x184040d0,
0x00000000, 0x004040f8,
0x00000000, 0x08404130,
0x00000000, 0x08404150,
0x00000000, 0x04404164,
0x00000000, 0x04404178,
0x00000000, 0x1c404200,
0x00000000, 0x34404404,
0x00000000, 0x0c404460,
0x00000000, 0x00404480,
0x00000000, 0x00404498,
0x00000000, 0x0c404604,
0x00000000, 0x7c404618,
0x00000000, 0x50404698,
0x00000000, 0x044046f0,
0x00000000, 0x54404700,
0x00000000, 0x00405800,
0x00000000, 0x08405830,
0x00000000, 0x00405854,
0x00000000, 0x0c405870,
0x00000000, 0x04405a00,
0x00000000, 0x00405a18,
0x00000000, 0x00406020,
0x00000000, 0x0c406028,
0x00000000, 0x044064a8,
0x00000000, 0x104064b4,
0x00000000, 0x00407804,
0x00000000, 0x1440780c,
0x00000000, 0x004078bc,
0x00000000, 0x18408000,
0x00000000, 0x00408064,
0x00000000, 0x08408800,
0x00000000, 0x0c408900,
0x00000000, 0x00408980,
0x00000000,
0x00000000,
0x00000000, 0x00000000,
0x00000000, 0x00000000,
0x00000000, 0x00000000,
......
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