summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2007-10-02 21:56:01 +0300
committerPekka Paalanen <pq@iki.fi>2007-10-02 22:18:47 +0300
commita72eb27fbc7a66e35018ffbcb5137cfaaf4049aa (patch)
treee5c2c12e0759ba1c97f138889574bc59e23964f1 /shared-core
parentafc57ef1dfb5bdf17411505d4dfbb03863a870bf (diff)
nouveau: nv20 graph_create_context difference
nv20 writes the chan->id to a different place than nv28. This still does not make nv20 run nv10_demo.
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/nv20_graph.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared-core/nv20_graph.c b/shared-core/nv20_graph.c
index 6b4c25e0..aba5a7e4 100644
--- a/shared-core/nv20_graph.c
+++ b/shared-core/nv20_graph.c
@@ -3004,12 +3004,14 @@ int nv20_graph_create_context(struct nouveau_channel *chan)
struct drm_nouveau_private *dev_priv = dev->dev_private;
void (*ctx_init)(struct drm_device *, struct nouveau_gpuobj *);
unsigned int ctx_size;
+ unsigned int idoffs = 0x28/4;
int ret;
switch (dev_priv->chipset) {
case 0x20:
ctx_size = NV20_GRCTX_SIZE;
ctx_init = nv20_graph_context_init;
+ idoffs = 0;
break;
case 0x25:
case 0x28:
@@ -3048,7 +3050,7 @@ int nv20_graph_create_context(struct nouveau_channel *chan)
ctx_init(dev, chan->ramin_grctx->gpuobj);
/* nv20: INSTANCE_WR(chan->ramin_grctx->gpuobj, 10, chan->id<<24); */
- INSTANCE_WR(chan->ramin_grctx->gpuobj, 0x28/4, (chan->id<<24)|0x1);
+ INSTANCE_WR(chan->ramin_grctx->gpuobj, idoffs, (chan->id<<24)|0x1);
/* CTX_USER */
INSTANCE_WR(dev_priv->ctx_table->gpuobj, chan->id,