Commit 39c8d368 authored by Ben Skeggs's avatar Ben Skeggs

drm/nv40/gr: move to exec engine interfaces

Like nv50, this needs a good cleanup.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7a45cd19
...@@ -1177,14 +1177,7 @@ extern int nv30_graph_init(struct drm_device *); ...@@ -1177,14 +1177,7 @@ extern int nv30_graph_init(struct drm_device *);
extern void nv20_graph_set_tile_region(struct drm_device *dev, int i); extern void nv20_graph_set_tile_region(struct drm_device *dev, int i);
/* nv40_graph.c */ /* nv40_graph.c */
extern int nv40_graph_init(struct drm_device *); extern int nv40_graph_create(struct drm_device *);
extern void nv40_graph_takedown(struct drm_device *);
extern struct nouveau_channel *nv40_graph_channel(struct drm_device *);
extern int nv40_graph_create_context(struct nouveau_channel *);
extern void nv40_graph_destroy_context(struct nouveau_channel *);
extern int nv40_graph_load_context(struct nouveau_channel *);
extern int nv40_graph_unload_context(struct drm_device *);
extern int nv40_graph_object_new(struct nouveau_channel *, u32, u16);
extern void nv40_grctx_init(struct nouveau_grctx *); extern void nv40_grctx_init(struct nouveau_grctx *);
extern void nv40_graph_set_tile_region(struct drm_device *dev, int i); extern void nv40_graph_set_tile_region(struct drm_device *dev, int i);
......
...@@ -299,15 +299,10 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) ...@@ -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.init_tile_region = nv30_fb_init_tile_region;
engine->fb.set_tile_region = nv40_fb_set_tile_region; engine->fb.set_tile_region = nv40_fb_set_tile_region;
engine->fb.free_tile_region = nv30_fb_free_tile_region; engine->fb.free_tile_region = nv30_fb_free_tile_region;
engine->graph.init = nv40_graph_init; engine->graph.init = nouveau_stub_init;
engine->graph.takedown = nv40_graph_takedown; engine->graph.takedown = nouveau_stub_takedown;
engine->graph.fifo_access = nv04_graph_fifo_access; engine->graph.fifo_access = nvc0_graph_fifo_access;
engine->graph.channel = nv40_graph_channel; engine->graph.channel = nvc0_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.set_tile_region = nv40_graph_set_tile_region; engine->graph.set_tile_region = nv40_graph_set_tile_region;
engine->fifo.channels = 32; engine->fifo.channels = 32;
engine->fifo.init = nv40_fifo_init; engine->fifo.init = nv40_fifo_init;
...@@ -618,11 +613,17 @@ nouveau_card_init(struct drm_device *dev) ...@@ -618,11 +613,17 @@ nouveau_card_init(struct drm_device *dev)
if (ret) if (ret)
goto out_timer; 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); nv50_graph_create(dev);
else break;
if (dev_priv->card_type == NV_C0) case NV_C0:
nvc0_graph_create(dev); nvc0_graph_create(dev);
break;
}
switch (dev_priv->chipset) { switch (dev_priv->chipset) {
case 0x84: case 0x84:
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment