From 4297a83b48664b2b6a6dc0a72a4d11b043f34778 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 12 Jan 2007 00:13:05 -0500 Subject: nouveau: get nv30 context switching to work. * Pulled in some registers from nv10reg.h. Needed for context switching. * Filled in nv30 graphics context (based on nv40_graph.c). * Figure out nv30 context table, set up on context creation. Allows the cards automatic switching to work. --- shared-core/nouveau_reg.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'shared-core/nouveau_reg.h') diff --git a/shared-core/nouveau_reg.h b/shared-core/nouveau_reg.h index 23fce39a..97d81048 100644 --- a/shared-core/nouveau_reg.h +++ b/shared-core/nouveau_reg.h @@ -71,6 +71,21 @@ #define NV_PGRAPH_FIFO 0x00400720 #define NV_PGRAPH_FFINTFC_ST2 0x00400764 +/* NV-Register NV_PGRAPH_CHANNEL_CTX_TABLE */ +#define NV_PGRAPH_CHANNEL_CTX_TABLE 0x00400780 +#define NV_PGRAPH_CHANNEL_CTX_TABLE_INST 0x0000FFFF +#define NV_PGRAPH_CHANNEL_CTX_TABLE_INST_0 0x00000000 + +/* NV-Register NV_PGRAPH_CHANNEL_CTX_SIZE */ +#define NV_PGRAPH_CHANNEL_CTX_SIZE 0x00400784 +#define NV_PGRAPH_CHANNEL_CTX_SIZE_VALUE 0x0000FFFF +#define NV_PGRAPH_CHANNEL_CTX_SIZE_VALUE_INIT 0x00001000 + +/* NV-Register NV_PGRAPH_CHANNEL_CTX_POINTER */ +#define NV_PGRAPH_CHANNEL_CTX_POINTER 0x00400788 +#define NV_PGRAPH_CHANNEL_CTX_POINTER_INST 0x0000FFFF +#define NV_PGRAPH_CHANNEL_CTX_POINTER_INST_0 0x00000000 + /* It's a guess that this works on NV03. Confirmed on NV04, though */ #define NV_PFIFO_DELAY_0 0x00002040 #define NV_PFIFO_DMA_TIMESLICE 0x00002044 -- cgit v1.2.3