Skip to content

Commit

Permalink
drm/nvc0/gr: move to exec engine interfaces
Browse files Browse the repository at this point in the history
Much nicer to do that nv50, the code was pretty much written to expect
such a change in the future.

Signed-off-by: Ben Skeggs <[email protected]>
  • Loading branch information
Ben Skeggs committed May 16, 2011
1 parent 2703c21 commit 7a45cd1
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 230 deletions.
8 changes: 1 addition & 7 deletions drivers/gpu/drm/nouveau/nouveau_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1194,15 +1194,9 @@ extern int nv50_grctx_init(struct nouveau_grctx *);
extern struct nouveau_enum nv50_data_error_names[];

/* nvc0_graph.c */
extern int nvc0_graph_init(struct drm_device *);
extern void nvc0_graph_takedown(struct drm_device *);
extern int nvc0_graph_create(struct drm_device *);
extern void nvc0_graph_fifo_access(struct drm_device *, bool);
extern struct nouveau_channel *nvc0_graph_channel(struct drm_device *);
extern int nvc0_graph_create_context(struct nouveau_channel *);
extern void nvc0_graph_destroy_context(struct nouveau_channel *);
extern int nvc0_graph_load_context(struct nouveau_channel *);
extern int nvc0_graph_unload_context(struct drm_device *);
extern int nvc0_graph_object_new(struct nouveau_channel *, u32, u16);

/* nv84_crypt.c */
extern int nv84_crypt_create(struct drm_device *);
Expand Down
10 changes: 3 additions & 7 deletions drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,15 +440,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine->timer.takedown = nv04_timer_takedown;
engine->fb.init = nvc0_fb_init;
engine->fb.takedown = nvc0_fb_takedown;
engine->graph.init = nvc0_graph_init;
engine->graph.takedown = nvc0_graph_takedown;
engine->graph.fifo_access = nvc0_graph_fifo_access;
engine->graph.channel = nvc0_graph_channel;
engine->graph.create_context = nvc0_graph_create_context;
engine->graph.destroy_context = nvc0_graph_destroy_context;
engine->graph.load_context = nvc0_graph_load_context;
engine->graph.unload_context = nvc0_graph_unload_context;
engine->graph.object_new = nvc0_graph_object_new;
engine->fifo.channels = 128;
engine->fifo.init = nvc0_fifo_init;
engine->fifo.takedown = nvc0_fifo_takedown;
Expand Down Expand Up @@ -627,6 +620,9 @@ nouveau_card_init(struct drm_device *dev)

if (dev_priv->card_type == NV_50)
nv50_graph_create(dev);
else
if (dev_priv->card_type == NV_C0)
nvc0_graph_create(dev);

switch (dev_priv->chipset) {
case 0x84:
Expand Down
Loading

0 comments on commit 7a45cd1

Please sign in to comment.