diff --git a/shared-core/nouveau_fifo.c b/shared-core/nouveau_fifo.c index 8e66ca2..6068b38 100644 --- a/shared-core/nouveau_fifo.c +++ b/shared-core/nouveau_fifo.c @@ -83,6 +83,8 @@ static int nouveau_fifo_instmem_configure(drm_device_t *dev) case NV_50: case NV_40: NV_WRITE(NV40_PFIFO_RAMFC, 0x30002); + if((dev_priv->chipset == 0x49) || (dev_priv->chipset == 0x4b)) + NV_WRITE(0x2230,0x00000001); break; case NV_44: NV_WRITE(NV40_PFIFO_RAMFC, ((nouveau_mem_fb_amount(dev)-512*1024+dev_priv->ramfc_offset)>>16) | diff --git a/shared-core/nv40_graph.c b/shared-core/nv40_graph.c index 792734e..591f99e 100644 --- a/shared-core/nv40_graph.c +++ b/shared-core/nv40_graph.c @@ -11,7 +11,9 @@ #define NV40_GRCTX_SIZE (175*1024) #define NV43_GRCTX_SIZE (70*1024) #define NV46_GRCTX_SIZE (70*1024) /* probably ~64KiB */ +#define NV49_GRCTX_SIZE (164640) #define NV4A_GRCTX_SIZE (64*1024) +#define NV4B_GRCTX_SIZE (164640) #define NV4C_GRCTX_SIZE (25*1024) #define NV4E_GRCTX_SIZE (25*1024) @@ -425,6 +427,321 @@ static void nv46_graph_context_init(drm_device_t *dev, struct mem_block *ctx) INSTANCE_WR(ctx, i/4, 0x3f800000); } +static void nv49_graph_context_init(drm_device_t *dev, +struct mem_block *ctx) +{ + drm_nouveau_private_t *dev_priv = dev->dev_private; + int i; + + INSTANCE_WR(ctx, 0x00000/4, nouveau_chip_instance_get(dev, ctx)); + INSTANCE_WR(ctx, 0x00000004/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000008/4, 0x0000c040); + INSTANCE_WR(ctx, 0x0000000c/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000010/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000014/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000018/4, 0x0000c040); + INSTANCE_WR(ctx, 0x0000001c/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000020/4, 0x0000c040); + INSTANCE_WR(ctx, 0x000000c4/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x000000c8/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x000000d0/4, 0x00000001); + INSTANCE_WR(ctx, 0x000001bc/4, 0x20010001); + INSTANCE_WR(ctx, 0x000001c0/4, 0x0f73ef00); + INSTANCE_WR(ctx, 0x000001c8/4, 0x02008821); + INSTANCE_WR(ctx, 0x00000218/4, 0x00000040); + INSTANCE_WR(ctx, 0x0000021c/4, 0x00000040); + INSTANCE_WR(ctx, 0x00000220/4, 0x00000040); + INSTANCE_WR(ctx, 0x00000228/4, 0x00000040); + INSTANCE_WR(ctx, 0x00000234/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000238/4, 0x80000000); + INSTANCE_WR(ctx, 0x0000023c/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000240/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000244/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000248/4, 0x80000000); + INSTANCE_WR(ctx, 0x0000024c/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000250/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000270/4, 0x0b0b0b0c); + INSTANCE_WR(ctx, 0x000003e0/4, 0x00040000); + INSTANCE_WR(ctx, 0x000003f0/4, 0x55555555); + INSTANCE_WR(ctx, 0x000003f4/4, 0x55555555); + INSTANCE_WR(ctx, 0x000003f8/4, 0x55555555); + INSTANCE_WR(ctx, 0x000003fc/4, 0x55555555); + INSTANCE_WR(ctx, 0x00000428/4, 0x00000008); + INSTANCE_WR(ctx, 0x0000043c/4, 0x00001010); + INSTANCE_WR(ctx, 0x00000460/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000464/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000468/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000046c/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000470/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000474/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000478/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000047c/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000480/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000484/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000488/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000048c/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000490/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000494/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000498/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000049c/4, 0x00000111); + INSTANCE_WR(ctx, 0x000004f4/4, 0x00000111); + INSTANCE_WR(ctx, 0x000004f8/4, 0x00080060); + INSTANCE_WR(ctx, 0x00000514/4, 0x00000080); + INSTANCE_WR(ctx, 0x00000518/4, 0xffff0000); + INSTANCE_WR(ctx, 0x0000051c/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000530/4, 0x46400000); + INSTANCE_WR(ctx, 0x00000540/4, 0xffff0000); + INSTANCE_WR(ctx, 0x00000544/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000548/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000054c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000550/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000554/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000558/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000055c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000560/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000564/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000568/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000056c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000570/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000574/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000578/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000057c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000580/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000594/4, 0x0fff0000); + INSTANCE_WR(ctx, 0x00000598/4, 0x0fff0000); + INSTANCE_WR(ctx, 0x000005a0/4, 0x00011100); + INSTANCE_WR(ctx, 0x000005bc/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005c0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005c4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005c8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005cc/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005d0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005d4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005d8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005dc/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005e0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005e4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005e8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005ec/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005f0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005f4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005f8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x00000604/4, 0x4b7fffff); + INSTANCE_WR(ctx, 0x0000062c/4, 0x30201000); + INSTANCE_WR(ctx, 0x00000630/4, 0x70605040); + INSTANCE_WR(ctx, 0x00000634/4, 0xb8a89888); + INSTANCE_WR(ctx, 0x00000638/4, 0xf8e8d8c8); + INSTANCE_WR(ctx, 0x0000064c/4, 0x40100000); + INSTANCE_WR(ctx, 0x00000668/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x0000069c/4, 0x435185d6); + INSTANCE_WR(ctx, 0x000006a0/4, 0x2155b699); + INSTANCE_WR(ctx, 0x000006a4/4, 0xfedcba98); + INSTANCE_WR(ctx, 0x000006a8/4, 0x00000098); + INSTANCE_WR(ctx, 0x000006b8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x000006bc/4, 0x00ff7000); + INSTANCE_WR(ctx, 0x000006c0/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x000006d0/4, 0x00ff0000); + INSTANCE_WR(ctx, 0x0000070c/4, 0x00ffff00); + INSTANCE_WR(ctx, 0x00000750/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000754/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000758/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000075c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000760/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000764/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000768/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000076c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000770/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000774/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000778/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000077c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000780/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000784/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000788/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000078c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000790/4, 0x00028202); + INSTANCE_WR(ctx, 0x00000794/4, 0x00028202); + INSTANCE_WR(ctx, 0x00000798/4, 0x00028202); + INSTANCE_WR(ctx, 0x0000079c/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007a0/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007a4/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007a8/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007ac/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007b0/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007b4/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007b8/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007bc/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007c0/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007c4/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007c8/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007cc/4, 0x00028202); + INSTANCE_WR(ctx, 0x00000810/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000814/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000818/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000081c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000820/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000824/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000828/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000082c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000830/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000834/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000838/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000083c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000840/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000844/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000848/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000084c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000850/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000854/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000858/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000085c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000860/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000864/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000868/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000086c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000870/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000874/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000878/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000087c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000880/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000884/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000888/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000088c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000890/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000894/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000898/4, 0x00080008); + INSTANCE_WR(ctx, 0x0000089c/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008a0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008a4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008a8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008ac/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008b0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008b4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008b8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008bc/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008c0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008c4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008c8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008cc/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000910/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000914/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000918/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000091c/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000920/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000924/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000928/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000092c/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000930/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000934/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000938/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000093c/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000940/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000944/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000948/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000094c/4, 0x00100008); + INSTANCE_WR(ctx, 0x000009a0/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009a4/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009a8/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009ac/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009b0/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009b4/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009b8/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009bc/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009d0/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009d4/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009d8/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009dc/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009f0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000009f4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000009f8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000009fc/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000a10/4, 0x00000002); + INSTANCE_WR(ctx, 0x00000a44/4, 0x00000421); + INSTANCE_WR(ctx, 0x00000a48/4, 0x030c30c3); + INSTANCE_WR(ctx, 0x00000a54/4, 0x3e020200); + INSTANCE_WR(ctx, 0x00000a58/4, 0x00ffffff); + INSTANCE_WR(ctx, 0x00000a5c/4, 0x20103f00); + INSTANCE_WR(ctx, 0x00000a68/4, 0x00040000); + INSTANCE_WR(ctx, 0x00000aa0/4, 0x00008100); + INSTANCE_WR(ctx, 0x00000b2c/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000b70/4, 0x00001001); + INSTANCE_WR(ctx, 0x00000b7c/4, 0x00000003); + INSTANCE_WR(ctx, 0x00000b80/4, 0x00888001); + INSTANCE_WR(ctx, 0x00000bb0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bb4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bb8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bbc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bc0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bc4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bc8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bcc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bd0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bd4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bd8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bdc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000be0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000be4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000be8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bec/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bf0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bf4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bf8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bfc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c00/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c04/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c08/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c0c/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c10/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c14/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c18/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c1c/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c20/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c24/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c28/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c2c/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c54/4, 0x00000005); + INSTANCE_WR(ctx, 0x00000c60/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x00000c7c/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c80/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c84/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c88/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c8c/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c90/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c94/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c98/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c9c/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000cd4/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000cd8/4, 0x08e00001); + INSTANCE_WR(ctx, 0x00000cdc/4, 0x000e3000); + for(i=0x030a0; i<=0x03118; i+=8) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x098a0; i<=0x0ba90; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x0baa0; i<=0x0be90; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x0e2e0; i<=0x0fff0; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x10008; i<=0x104d0; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x104e0; i<=0x108d0; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x12d20; i<=0x14f10; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x14f20; i<=0x15310; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x17760; i<=0x19950; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x19960; i<=0x19d50; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x1c1a0; i<=0x1e390; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x1e3a0; i<=0x1e790; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x20be0; i<=0x22dd0; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x22de0; i<=0x231d0; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); +} + static void nv4a_graph_context_init(drm_device_t *dev, struct mem_block *ctx) { drm_nouveau_private_t *dev_priv = dev->dev_private; @@ -541,6 +858,312 @@ static void nv4a_graph_context_init(drm_device_t *dev, struct mem_block *ctx) INSTANCE_WR(ctx, i/4, 0x3f800000); } +static void nv4b_graph_context_init(drm_device_t *dev, +struct mem_block *ctx) +{ + drm_nouveau_private_t *dev_priv = dev->dev_private; + int i; + + INSTANCE_WR(ctx, 0x00000/4, nouveau_chip_instance_get(dev, ctx)); + INSTANCE_WR(ctx, 0x00000004/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000008/4, 0x0000c040); + INSTANCE_WR(ctx, 0x0000000c/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000010/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000014/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000018/4, 0x0000c040); + INSTANCE_WR(ctx, 0x0000001c/4, 0x0000c040); + INSTANCE_WR(ctx, 0x00000020/4, 0x0000c040); + INSTANCE_WR(ctx, 0x000000c4/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x000000c8/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x000000d0/4, 0x00000001); + INSTANCE_WR(ctx, 0x000001bc/4, 0x20010001); + INSTANCE_WR(ctx, 0x000001c0/4, 0x0f73ef00); + INSTANCE_WR(ctx, 0x000001c8/4, 0x02008821); + INSTANCE_WR(ctx, 0x00000218/4, 0x00000040); + INSTANCE_WR(ctx, 0x0000021c/4, 0x00000040); + INSTANCE_WR(ctx, 0x00000220/4, 0x00000040); + INSTANCE_WR(ctx, 0x00000228/4, 0x00000040); + INSTANCE_WR(ctx, 0x00000234/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000238/4, 0x80000000); + INSTANCE_WR(ctx, 0x0000023c/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000240/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000244/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000248/4, 0x80000000); + INSTANCE_WR(ctx, 0x0000024c/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000250/4, 0x80000000); + INSTANCE_WR(ctx, 0x00000270/4, 0x0b0b0b0c); + INSTANCE_WR(ctx, 0x000003e0/4, 0x00040000); + INSTANCE_WR(ctx, 0x000003f0/4, 0x55555555); + INSTANCE_WR(ctx, 0x000003f4/4, 0x55555555); + INSTANCE_WR(ctx, 0x000003f8/4, 0x55555555); + INSTANCE_WR(ctx, 0x000003fc/4, 0x55555555); + INSTANCE_WR(ctx, 0x00000428/4, 0x00000008); + INSTANCE_WR(ctx, 0x0000043c/4, 0x00001010); + INSTANCE_WR(ctx, 0x00000460/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000464/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000468/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000046c/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000470/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000474/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000478/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000047c/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000480/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000484/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000488/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000048c/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000490/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000494/4, 0x00000111); + INSTANCE_WR(ctx, 0x00000498/4, 0x00000111); + INSTANCE_WR(ctx, 0x0000049c/4, 0x00000111); + INSTANCE_WR(ctx, 0x000004f4/4, 0x00000111); + INSTANCE_WR(ctx, 0x000004f8/4, 0x00080060); + INSTANCE_WR(ctx, 0x00000514/4, 0x00000080); + INSTANCE_WR(ctx, 0x00000518/4, 0xffff0000); + INSTANCE_WR(ctx, 0x0000051c/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000530/4, 0x46400000); + INSTANCE_WR(ctx, 0x00000540/4, 0xffff0000); + INSTANCE_WR(ctx, 0x00000544/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000548/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000054c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000550/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000554/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000558/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000055c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000560/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000564/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000568/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000056c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000570/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000574/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000578/4, 0x88888888); + INSTANCE_WR(ctx, 0x0000057c/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000580/4, 0x88888888); + INSTANCE_WR(ctx, 0x00000594/4, 0x0fff0000); + INSTANCE_WR(ctx, 0x00000598/4, 0x0fff0000); + INSTANCE_WR(ctx, 0x000005a0/4, 0x00011100); + INSTANCE_WR(ctx, 0x000005bc/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005c0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005c4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005c8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005cc/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005d0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005d4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005d8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005dc/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005e0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005e4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005e8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005ec/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005f0/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005f4/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x000005f8/4, 0x07ff0000); + INSTANCE_WR(ctx, 0x00000604/4, 0x4b7fffff); + INSTANCE_WR(ctx, 0x0000062c/4, 0x30201000); + INSTANCE_WR(ctx, 0x00000630/4, 0x70605040); + INSTANCE_WR(ctx, 0x00000634/4, 0xb8a89888); + INSTANCE_WR(ctx, 0x00000638/4, 0xf8e8d8c8); + INSTANCE_WR(ctx, 0x0000064c/4, 0x40100000); + INSTANCE_WR(ctx, 0x00000668/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x0000069c/4, 0x435185d6); + INSTANCE_WR(ctx, 0x000006a0/4, 0x2155b699); + INSTANCE_WR(ctx, 0x000006a4/4, 0xfedcba98); + INSTANCE_WR(ctx, 0x000006a8/4, 0x00000098); + INSTANCE_WR(ctx, 0x000006b8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x000006bc/4, 0x00ff7000); + INSTANCE_WR(ctx, 0x000006c0/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x000006d0/4, 0x00ff0000); + INSTANCE_WR(ctx, 0x0000070c/4, 0x00ffff00); + INSTANCE_WR(ctx, 0x00000750/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000754/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000758/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000075c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000760/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000764/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000768/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000076c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000770/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000774/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000778/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000077c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000780/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000784/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000788/4, 0x00018488); + INSTANCE_WR(ctx, 0x0000078c/4, 0x00018488); + INSTANCE_WR(ctx, 0x00000790/4, 0x00028202); + INSTANCE_WR(ctx, 0x00000794/4, 0x00028202); + INSTANCE_WR(ctx, 0x00000798/4, 0x00028202); + INSTANCE_WR(ctx, 0x0000079c/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007a0/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007a4/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007a8/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007ac/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007b0/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007b4/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007b8/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007bc/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007c0/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007c4/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007c8/4, 0x00028202); + INSTANCE_WR(ctx, 0x000007cc/4, 0x00028202); + INSTANCE_WR(ctx, 0x00000810/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000814/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000818/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000081c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000820/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000824/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000828/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000082c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000830/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000834/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000838/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000083c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000840/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000844/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000848/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x0000084c/4, 0x0000aae4); + INSTANCE_WR(ctx, 0x00000850/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000854/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000858/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000085c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000860/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000864/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000868/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000086c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000870/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000874/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000878/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000087c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000880/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000884/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000888/4, 0x01012000); + INSTANCE_WR(ctx, 0x0000088c/4, 0x01012000); + INSTANCE_WR(ctx, 0x00000890/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000894/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000898/4, 0x00080008); + INSTANCE_WR(ctx, 0x0000089c/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008a0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008a4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008a8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008ac/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008b0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008b4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008b8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008bc/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008c0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008c4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008c8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000008cc/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000910/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000914/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000918/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000091c/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000920/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000924/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000928/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000092c/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000930/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000934/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000938/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000093c/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000940/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000944/4, 0x00100008); + INSTANCE_WR(ctx, 0x00000948/4, 0x00100008); + INSTANCE_WR(ctx, 0x0000094c/4, 0x00100008); + INSTANCE_WR(ctx, 0x000009a0/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009a4/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009a8/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009ac/4, 0x0001bc80); + INSTANCE_WR(ctx, 0x000009b0/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009b4/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009b8/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009bc/4, 0x00000202); + INSTANCE_WR(ctx, 0x000009d0/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009d4/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009d8/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009dc/4, 0x00000008); + INSTANCE_WR(ctx, 0x000009f0/4, 0x00080008); + INSTANCE_WR(ctx, 0x000009f4/4, 0x00080008); + INSTANCE_WR(ctx, 0x000009f8/4, 0x00080008); + INSTANCE_WR(ctx, 0x000009fc/4, 0x00080008); + INSTANCE_WR(ctx, 0x00000a10/4, 0x00000002); + INSTANCE_WR(ctx, 0x00000a44/4, 0x00000421); + INSTANCE_WR(ctx, 0x00000a48/4, 0x030c30c3); + INSTANCE_WR(ctx, 0x00000a54/4, 0x3e020200); + INSTANCE_WR(ctx, 0x00000a58/4, 0x00ffffff); + INSTANCE_WR(ctx, 0x00000a5c/4, 0x20103f00); + INSTANCE_WR(ctx, 0x00000a68/4, 0x00040000); + INSTANCE_WR(ctx, 0x00000aa0/4, 0x00008100); + INSTANCE_WR(ctx, 0x00000b2c/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000b70/4, 0x00001001); + INSTANCE_WR(ctx, 0x00000b7c/4, 0x00000003); + INSTANCE_WR(ctx, 0x00000b80/4, 0x00888001); + INSTANCE_WR(ctx, 0x00000bb0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bb4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bb8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bbc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bc0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bc4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bc8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bcc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bd0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bd4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bd8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bdc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000be0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000be4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000be8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bec/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bf0/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bf4/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bf8/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000bfc/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c00/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c04/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c08/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c0c/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c10/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c14/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c18/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c1c/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c20/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c24/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c28/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c2c/4, 0xffffffff); + INSTANCE_WR(ctx, 0x00000c54/4, 0x00000005); + INSTANCE_WR(ctx, 0x00000c60/4, 0x0000ffff); + INSTANCE_WR(ctx, 0x00000c7c/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c80/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c84/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c88/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c8c/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c90/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c94/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c98/4, 0x00005555); + INSTANCE_WR(ctx, 0x00000c9c/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000cd4/4, 0x00000001); + INSTANCE_WR(ctx, 0x00000cd8/4, 0x08e00001); + INSTANCE_WR(ctx, 0x00000cdc/4, 0x000e3000); + for(i=0x030a0; i<=0x03118; i+=8) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x098a0; i<=0x0ba90; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x0baa0; i<=0x0be90; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x0e2e0; i<=0x0fff0; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x10008; i<=0x104d0; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x104e0; i<=0x108d0; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x12d20; i<=0x14f10; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x14f20; i<=0x15310; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); + for(i=0x17760; i<=0x19950; i+=24) + INSTANCE_WR(ctx, i/4, 0x00000001); + for(i=0x19960; i<=0x19d50; i+=16) + INSTANCE_WR(ctx, i/4, 0x3f800000); +} static void nv4c_graph_context_init(drm_device_t *dev, struct mem_block *ctx) { @@ -777,10 +1400,18 @@ nv40_graph_context_create(drm_device_t *dev, int channel) ctx_size = NV46_GRCTX_SIZE; ctx_init = nv46_graph_context_init; break; + case 0x49: + ctx_size = NV49_GRCTX_SIZE; + ctx_init = nv49_graph_context_init; + break; case 0x4a: ctx_size = NV4A_GRCTX_SIZE; ctx_init = nv4a_graph_context_init; break; + case 0x4b: + ctx_size = NV4B_GRCTX_SIZE; + ctx_init = nv4b_graph_context_init; + break; case 0x4c: ctx_size = NV4C_GRCTX_SIZE; ctx_init = nv4c_graph_context_init; @@ -1007,6 +1638,39 @@ static uint32_t nv46_ctx_voodoo[] = { 0x00600009, 0x00700005, 0x00700006, 0x0060000e, ~0 }; +//this is used for nv49 and nv4b +static uint32_t nv49_4b_ctx_voodoo[] ={ + 0x00400564, 0x00400505, 0x00408165, 0x00408206, 0x00409e68, 0x00200020, + 0x0060000a, 0x00700080, 0x00104042, 0x00200020, 0x0060000a, 0x00700000, + 0x001040c5, 0x00400f26, 0x00401068, 0x0060000d, 0x0070008f, 0x0070000e, + 0x00408d68, 0x004015e6, 0x007000a0, 0x00700080, 0x0040180f, 0x00700000, + 0x00200029, 0x0060000a, 0x0011814d, 0x00110158, 0x00105401, 0x0020003a, + 0x00100051, 0x001040c5, 0x0010c1c4, 0x001041c9, 0x0010c1dc, 0x00150210, + 0x0012c225, 0x00108238, 0x0010823e, 0x001242c0, 0x00200040, 0x00100280, + 0x00128100, 0x00128120, 0x00128143, 0x0011415f, 0x0010815c, 0x0010c140, + 0x00104029, 0x00110400, 0x00104d12, 0x00500060, 0x004071e6, 0x00200118, + 0x0060000a, 0x00200020, 0x00100620, 0x00154650, 0x00104668, 0x0017466d, + 0x0011068b, 0x00168691, 0x001046ae, 0x001046b0, 0x001206b4, 0x001046c4, + 0x001146c6, 0x00200022, 0x001006cc, 0x001246f0, 0x002000c0, 0x00100700, + 0x0010c3d7, 0x001043e1, 0x00500060, 0x00200290, 0x0060000a, 0x00104800, + 0x00108901, 0x00124920, 0x0020001f, 0x00100940, 0x00140965, 0x00144a00, + 0x00104a19, 0x0010ca1c, 0x00110b00, 0x00200028, 0x00100b08, 0x00134c2e, + 0x0010cd00, 0x0010cd04, 0x00120d08, 0x00104d80, 0x00104e00, 0x0012d600, + 0x00105c00, 0x00104f06, 0x00105406, 0x00105709, 0x00200340, 0x0060000a, + 0x00300000, 0x00200680, 0x00406a0f, 0x00200684, 0x00800001, 0x00200b88, + 0x0060000a, 0x00209540, 0x0040708a, 0x00201350, 0x00800041, 0x00407c0f, + 0x00600006, 0x00407ce6, 0x00700080, 0x002000a2, 0x0060000a, 0x00104280, + 0x00200340, 0x0060000a, 0x00200004, 0x00800001, 0x0070008e, 0x00408d68, + 0x0040020f, 0x00600006, 0x00409e68, 0x00600007, 0x0070000f, 0x0070000e, + 0x00408d68, 0x0091a880, 0x00901ffe, 0x10940000, 0x00200020, 0x0060000b, + 0x00500069, 0x0060000c, 0x00401568, 0x00700000, 0x00200001, 0x0040910e, + 0x00200021, 0x0060000a, 0x00409b0d, 0x00104a40, 0x00104a50, 0x00104a60, + 0x00104a70, 0x00104a80, 0x00104a90, 0x00104aa0, 0x00104ab0, 0x00407e0e, + 0x0040130f, 0x00408568, 0x0040a006, 0x0040a105, 0x00600009, 0x00700005, + 0x00700006, 0x0060000e, ~0 +}; + + static uint32_t nv4a_ctx_voodoo[] = { 0x00400889, 0x00200000, 0x0060000a, 0x00200000, 0x00300000, 0x00800001, 0x00700009, 0x0060000e, 0x00400d64, 0x00400d05, 0x00409965, 0x00409e06, @@ -1100,7 +1764,9 @@ nv40_graph_init(drm_device_t *dev) case 0x40: ctx_voodoo = nv40_ctx_voodoo; break; case 0x43: ctx_voodoo = nv43_ctx_voodoo; break; case 0x46: ctx_voodoo = nv46_ctx_voodoo; break; + case 0x49: ctx_voodoo = nv49_4b_ctx_voodoo; break; case 0x4a: ctx_voodoo = nv4a_ctx_voodoo; break; + case 0x4b: ctx_voodoo = nv49_4b_ctx_voodoo; break; case 0x4e: ctx_voodoo = nv4e_ctx_voodoo; break; default: DRM_ERROR("Unknown ctx_voodoo for chipset 0x%02x\n",