diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-11-14 05:09:07 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-11-14 05:09:07 +1100 |
commit | eb5487b9ca1d7ce60d5ddc784089d91cf176f439 (patch) | |
tree | 55309717d95b69223a6c1c815286196c47ccd70c /shared-core/nv04_graph.c | |
parent | 2370ded79b4176d76cda1ec5f495fd33c2d566ed (diff) | |
parent | 7c1e59fb0c5043d3d369f5feb8e195a6a3da3457 (diff) |
Merge branch 'fifo-cleanup' into upstream-master
Diffstat (limited to 'shared-core/nv04_graph.c')
-rw-r--r-- | shared-core/nv04_graph.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared-core/nv04_graph.c b/shared-core/nv04_graph.c index 04dbf0ed..81a6d5c8 100644 --- a/shared-core/nv04_graph.c +++ b/shared-core/nv04_graph.c @@ -353,6 +353,7 @@ struct graph_state { void nouveau_nv04_context_switch(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_engine *engine = &dev_priv->Engine; struct nouveau_channel *next, *last; int chid; @@ -370,7 +371,7 @@ void nouveau_nv04_context_switch(struct drm_device *dev) return; } - chid = NV_READ(NV03_PFIFO_CACHE1_PUSH1)&(nouveau_fifo_number(dev)-1); + chid = engine->fifo.channel_id(dev); next = dev_priv->fifos[chid]; if (!next) { @@ -378,7 +379,7 @@ void nouveau_nv04_context_switch(struct drm_device *dev) return; } - chid = (NV_READ(NV04_PGRAPH_CTX_USER) >> 24) & (nouveau_fifo_number(dev)-1); + chid = (NV_READ(NV04_PGRAPH_CTX_USER) >> 24) & (engine->fifo.channels - 1); last = dev_priv->fifos[chid]; if (!last) { |