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.
main
Pekka Paalanen 2007-10-02 21:56:01 +03:00
parent afc57ef1df
commit a72eb27fbc
1 changed files with 3 additions and 1 deletions

View File

@ -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,