From 00bb534a546a4ca4bb6e167f5b387fa8156f4ca7 Mon Sep 17 00:00:00 2001 From: Matthieu Castet Date: Sun, 9 Sep 2007 15:49:33 +0200 Subject: [PATCH] nouveau : nv10 fix NV10_PGRAPH_CTX_USER save/load --- shared-core/nv10_graph.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shared-core/nv10_graph.c b/shared-core/nv10_graph.c index f90ba05..456bc5d 100644 --- a/shared-core/nv10_graph.c +++ b/shared-core/nv10_graph.c @@ -652,7 +652,6 @@ int nv10_graph_load_context(struct nouveau_channel *chan) for (j = 0; j < sizeof(nv17_graph_ctx_regs)/sizeof(nv17_graph_ctx_regs[0]); i++,j++) NV_WRITE(nv17_graph_ctx_regs[j], chan->pgraph_ctx[i]); } - NV_WRITE(NV10_PGRAPH_CTX_USER, chan->id << 24); nv10_graph_load_pipe(chan); @@ -725,14 +724,12 @@ void nouveau_nv10_context_switch(struct drm_device *dev) nouveau_wait_for_idle(dev); NV_WRITE(NV10_PGRAPH_CTX_CONTROL, 0x10000000); - NV_WRITE(NV10_PGRAPH_CTX_USER, (NV_READ(NV10_PGRAPH_CTX_USER) & 0xffffff) | (0x1f << 24)); nouveau_wait_for_idle(dev); nv10_graph_load_context(next); NV_WRITE(NV10_PGRAPH_CTX_CONTROL, 0x10010100); - //NV_WRITE(NV10_PGRAPH_CTX_USER, next->id << 24); NV_WRITE(NV10_PGRAPH_FFINTFC_ST2, NV_READ(NV10_PGRAPH_FFINTFC_ST2)&0xCFFFFFFF); NV_WRITE(NV04_PGRAPH_FIFO,0x1); } @@ -796,6 +793,7 @@ int nv10_graph_create_context(struct nouveau_channel *chan) { NV_WRITE_CTX(0x00400ec0, 0x00000080); NV_WRITE_CTX(0x00400ed0, 0x00000080); } + NV_WRITE_CTX(NV10_PGRAPH_CTX_USER, chan->id << 24); nv10_graph_create_pipe(chan); return 0; -- 2.7.4