From a72eb27fbc7a66e35018ffbcb5137cfaaf4049aa Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 2 Oct 2007 21:56:01 +0300 Subject: 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. --- shared-core/nv20_graph.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shared-core') 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, -- cgit v1.2.3