summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_fifo.c
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-02-06 01:17:32 +0100
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-02-06 01:17:32 +0100
commit17985f07d68322519919a7f629a6d2d9bf3916ed (patch)
tree969c2db6c77420aaed654a15265715becd3ef622 /shared-core/nouveau_fifo.c
parent8c663b4e56b45d377a5a0fed4318a129fc1233fa (diff)
nouveau: more work on the nv04 context switch code.
Diffstat (limited to 'shared-core/nouveau_fifo.c')
-rw-r--r--shared-core/nouveau_fifo.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/shared-core/nouveau_fifo.c b/shared-core/nouveau_fifo.c
index ca3b85c1..7f929c5c 100644
--- a/shared-core/nouveau_fifo.c
+++ b/shared-core/nouveau_fifo.c
@@ -197,16 +197,21 @@ int nouveau_fifo_init(drm_device_t *dev)
NV_WRITE(NV04_PFIFO_CACHE1_PULL1, 0x00000001);
/* FIXME on NV04 */
- NV_WRITE(NV10_PGRAPH_CTX_USER, 0x0);
- NV_WRITE(NV04_PFIFO_DELAY_0, 0xff /* retrycount*/ );
- if (dev_priv->card_type >= NV_40)
- NV_WRITE(NV03_PGRAPH_CTX_CONTROL, 0x00002001);
- else
- NV_WRITE(NV03_PGRAPH_CTX_CONTROL, 0x10110000);
+ if (dev_priv->card_type >= NV_10) {
+ NV_WRITE(NV10_PGRAPH_CTX_USER, 0x0);
+ NV_WRITE(NV04_PFIFO_DELAY_0, 0xff /* retrycount*/ );
+ if (dev_priv->card_type >= NV_40)
+ NV_WRITE(NV10_PGRAPH_CTX_CONTROL, 0x00002001);
+ else
+ NV_WRITE(NV10_PGRAPH_CTX_CONTROL, 0x10110000);
+ } else {
+ NV_WRITE(NV04_PGRAPH_CTX_USER, 0x0);
+ NV_WRITE(NV04_PFIFO_DELAY_0, 0xff /* retrycount*/ );
+ NV_WRITE(NV04_PGRAPH_CTX_CONTROL, 0x10110000);
+ }
NV_WRITE(NV04_PFIFO_DMA_TIMESLICE, 0x001fffff);
NV_WRITE(NV03_PFIFO_CACHES, 0x00000001);
-
return 0;
}