summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-06-24 18:58:14 +1000
committerBen Skeggs <skeggsb@gmail.com>2007-06-24 18:58:14 +1000
commit341bc7820749024e09275de6e689b10c2908689a (patch)
treedfbfbf82bf1c1fe4d9a97a1770cee64f3f9c4fe6 /shared-core/nouveau_state.c
parent05d86d950a10b77ffaa708e9d89b2a87c11fed01 (diff)
nouveau: NV1X/2X/3X PFIFO engtab functions
Earlier NV1X chips use the NV04 code, see previous commits about NV10 RAMFC entry size.
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index ed200e85..55d10b8c 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -106,6 +106,17 @@ static int nouveau_init_engine_ptrs(drm_device_t *dev)
engine->graph.takedown = nv10_graph_takedown;
engine->fifo.init = nouveau_fifo_init;
engine->fifo.takedown = nouveau_stub_takedown;
+ if (dev_priv->chipset < 0x17) {
+ engine->fifo.create_context = nv04_fifo_create_context;
+ engine->fifo.destroy_context = nv04_fifo_destroy_context;
+ engine->fifo.load_context = nv04_fifo_load_context;
+ engine->fifo.save_context = nv04_fifo_save_context;
+ } else {
+ engine->fifo.create_context = nv10_fifo_create_context;
+ engine->fifo.destroy_context = nv10_fifo_destroy_context;
+ engine->fifo.load_context = nv10_fifo_load_context;
+ engine->fifo.save_context = nv10_fifo_save_context;
+ }
break;
case 0x20:
engine->mc.init = nv04_mc_init;
@@ -118,6 +129,10 @@ static int nouveau_init_engine_ptrs(drm_device_t *dev)
engine->graph.takedown = nv20_graph_takedown;
engine->fifo.init = nouveau_fifo_init;
engine->fifo.takedown = nouveau_stub_takedown;
+ engine->fifo.create_context = nv10_fifo_create_context;
+ engine->fifo.destroy_context = nv10_fifo_destroy_context;
+ engine->fifo.load_context = nv10_fifo_load_context;
+ engine->fifo.save_context = nv10_fifo_save_context;
break;
case 0x30:
engine->mc.init = nv04_mc_init;
@@ -130,6 +145,10 @@ static int nouveau_init_engine_ptrs(drm_device_t *dev)
engine->graph.takedown = nv30_graph_takedown;
engine->fifo.init = nouveau_fifo_init;
engine->fifo.takedown = nouveau_stub_takedown;
+ engine->fifo.create_context = nv10_fifo_create_context;
+ engine->fifo.destroy_context = nv10_fifo_destroy_context;
+ engine->fifo.load_context = nv10_fifo_load_context;
+ engine->fifo.save_context = nv10_fifo_save_context;
break;
case 0x40:
engine->mc.init = nv40_mc_init;