summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_state.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-04-01 11:33:21 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-05-16 10:48:14 +1000
commit39c8d368273bca9b5f309f9feadfc8575c9fd993 (patch)
tree104e1d8be0189d3c3f21206d7c97ab3d9ca93f54 /drivers/gpu/drm/nouveau/nouveau_state.c
parent7a45cd19c95a383d81a7b2f5297958c0c16b5a08 (diff)
drm/nv40/gr: move to exec engine interfaces
Like nv50, this needs a good cleanup. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index 958f312a497c..d8852edc60cb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -299,15 +299,10 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine->fb.init_tile_region = nv30_fb_init_tile_region;
engine->fb.set_tile_region = nv40_fb_set_tile_region;
engine->fb.free_tile_region = nv30_fb_free_tile_region;
- engine->graph.init = nv40_graph_init;
- engine->graph.takedown = nv40_graph_takedown;
- engine->graph.fifo_access = nv04_graph_fifo_access;
- engine->graph.channel = nv40_graph_channel;
- engine->graph.create_context = nv40_graph_create_context;
- engine->graph.destroy_context = nv40_graph_destroy_context;
- engine->graph.load_context = nv40_graph_load_context;
- engine->graph.unload_context = nv40_graph_unload_context;
- engine->graph.object_new = nv40_graph_object_new;
+ engine->graph.init = nouveau_stub_init;
+ engine->graph.takedown = nouveau_stub_takedown;
+ engine->graph.fifo_access = nvc0_graph_fifo_access;
+ engine->graph.channel = nvc0_graph_channel;
engine->graph.set_tile_region = nv40_graph_set_tile_region;
engine->fifo.channels = 32;
engine->fifo.init = nv40_fifo_init;
@@ -618,11 +613,17 @@ nouveau_card_init(struct drm_device *dev)
if (ret)
goto out_timer;
- if (dev_priv->card_type == NV_50)
+ switch (dev_priv->card_type) {
+ case NV_40:
+ nv40_graph_create(dev);
+ break;
+ case NV_50:
nv50_graph_create(dev);
- else
- if (dev_priv->card_type == NV_C0)
+ break;
+ case NV_C0:
nvc0_graph_create(dev);
+ break;
+ }
switch (dev_priv->chipset) {
case 0x84: