diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-04-01 09:50:18 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-05-16 10:48:06 +1000 |
commit | 2703c21a82301f5c31ba5679e2d56422bd4cd404 (patch) | |
tree | 5c47247ff2ea9b103ecc7492bce19e2577b2e489 /drivers/gpu/drm/nouveau/nouveau_state.c | |
parent | 6dfdd7a61e8fc25552d9de1cb25272324dfc4c13 (diff) |
drm/nv50/gr: move to exec engine interfaces
This needs a massive cleanup, but to catch bugs from the interface changes
vs the engine code cleanup, this will be done later.
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.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index a1a25ea7cc7..6fd6736a15f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -363,20 +363,10 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) engine->timer.takedown = nv04_timer_takedown; engine->fb.init = nv50_fb_init; engine->fb.takedown = nv50_fb_takedown; - engine->graph.init = nv50_graph_init; - engine->graph.takedown = nv50_graph_takedown; - engine->graph.fifo_access = nv50_graph_fifo_access; - engine->graph.channel = nv50_graph_channel; - engine->graph.create_context = nv50_graph_create_context; - engine->graph.destroy_context = nv50_graph_destroy_context; - engine->graph.load_context = nv50_graph_load_context; - engine->graph.unload_context = nv50_graph_unload_context; - engine->graph.object_new = nv50_graph_object_new; - if (dev_priv->chipset == 0x50 || - dev_priv->chipset == 0xac) - engine->graph.tlb_flush = nv50_graph_tlb_flush; - else - engine->graph.tlb_flush = nv84_graph_tlb_flush; + 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->fifo.channels = 128; engine->fifo.init = nv50_fifo_init; engine->fifo.takedown = nv50_fifo_takedown; @@ -635,6 +625,9 @@ nouveau_card_init(struct drm_device *dev) if (ret) goto out_timer; + if (dev_priv->card_type == NV_50) + nv50_graph_create(dev); + switch (dev_priv->chipset) { case 0x84: case 0x86: @@ -712,8 +705,10 @@ out_graph: out_engine: if (!nouveau_noaccel) { for (e = e - 1; e >= 0; e--) { + if (!dev_priv->eng[e]) + continue; dev_priv->eng[e]->fini(dev, e); - dev_priv->eng[e]->destroy(dev, e); + dev_priv->eng[e]->destroy(dev,e ); } } |