diff options
author | Matthieu Castet <castet.matthieu@free.fr> | 2007-02-02 23:01:03 +0100 |
---|---|---|
committer | Matthieu Castet <castet.matthieu@free.fr> | 2007-02-02 23:01:03 +0100 |
commit | 55f7859a256814e3843790d88b275150f6161a26 (patch) | |
tree | 3a16e1f6f01f5cf8e79293bb075497017e378250 /shared-core | |
parent | 63cf3b3da7ee039c98c793d31ea1aa586a069c43 (diff) |
nouveau: nv ctx switch opps the size of array was wrong
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/nv10_graph.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shared-core/nv10_graph.c b/shared-core/nv10_graph.c index 726ec6df..7270344d 100644 --- a/shared-core/nv10_graph.c +++ b/shared-core/nv10_graph.c @@ -545,10 +545,10 @@ void nouveau_nv10_context_switch(drm_device_t *dev) #endif // save PGRAPH context - for (i = 0; i < sizeof(nv10_graph_ctx_regs); i++) + for (i = 0; i < sizeof(nv10_graph_ctx_regs)/sizeof(nv10_graph_ctx_regs[0]); i++) dev_priv->fifos[channel_old].nv10_pgraph_ctx[i] = NV_READ(nv10_graph_ctx_regs[i]); if (dev_priv->chipset>=0x17) { - for (j = 0; j < sizeof(nv17_graph_ctx_regs); i++,j++) + for (j = 0; j < sizeof(nv17_graph_ctx_regs)/sizeof(nv17_graph_ctx_regs[0]); i++,j++) dev_priv->fifos[channel_old].nv10_pgraph_ctx[i] = NV_READ(nv17_graph_ctx_regs[j]); } @@ -561,10 +561,10 @@ void nouveau_nv10_context_switch(drm_device_t *dev) // restore PGRAPH context //XXX not working yet #if 1 - for (i = 0; i < sizeof(nv10_graph_ctx_regs); i++) + for (i = 0; i < sizeof(nv10_graph_ctx_regs)/sizeof(nv10_graph_ctx_regs[0]); i++) NV_WRITE(nv10_graph_ctx_regs[i], dev_priv->fifos[channel].nv10_pgraph_ctx[i]); if (dev_priv->chipset>=0x17) { - for (j = 0; j < sizeof(nv17_graph_ctx_regs); i++,j++) + for (j = 0; j < sizeof(nv17_graph_ctx_regs)/sizeof(nv17_graph_ctx_regs[0]); i++,j++) NV_WRITE(nv17_graph_ctx_regs[j], dev_priv->fifos[channel].nv10_pgraph_ctx[i]); } nouveau_wait_for_idle(dev); |