From 17985f07d68322519919a7f629a6d2d9bf3916ed Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Tue, 6 Feb 2007 01:17:32 +0100 Subject: nouveau: more work on the nv04 context switch code. --- shared-core/nouveau_fifo.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'shared-core/nouveau_fifo.c') 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; } -- cgit v1.2.3