diff options
author | Stuart Bennett <sb476@cam.ac.uk> | 2008-08-08 16:20:52 +0100 |
---|---|---|
committer | Stuart Bennett <sb476@cam.ac.uk> | 2008-08-08 16:25:05 +0100 |
commit | 0c47151a571827905c34649208e22f8ec0175d62 (patch) | |
tree | 170d3ecb82a9c5a5f0b295e5cb438bbd3b46f6f1 /shared-core | |
parent | 4585787bd1a1d782b9e7c06095f98d09165b8c23 (diff) |
nouveau: wait for pgraph idle after loading or saving a context
the nvidia driver does this, and it stops the error message appearing on nv40
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/nv40_graph.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/shared-core/nv40_graph.c b/shared-core/nv40_graph.c index 2540fc5f..de178f57 100644 --- a/shared-core/nv40_graph.c +++ b/shared-core/nv40_graph.c @@ -1544,6 +1544,8 @@ nv40_graph_transfer_context(struct drm_device *dev, uint32_t inst, int save) tmp |= NV40_PGRAPH_CTXCTL_0304_XFER_CTX; NV_WRITE(NV40_PGRAPH_CTXCTL_0304, tmp); + nouveau_wait_for_idle(dev); + for (i = 0; i < tv; i++) { if (NV_READ(NV40_PGRAPH_CTXCTL_030C) == 0) break; @@ -1565,9 +1567,7 @@ nv40_graph_transfer_context(struct drm_device *dev, uint32_t inst, int save) return 0; } -/* Save current context (from PGRAPH) into the channel's context - *XXX: fails sometimes, not sure why.. - */ +/* Save current context (from PGRAPH) into the channel's context */ int nv40_graph_save_context(struct nouveau_channel *chan) { @@ -1581,9 +1581,7 @@ nv40_graph_save_context(struct nouveau_channel *chan) return nv40_graph_transfer_context(dev, inst, 1); } -/* Restore the context for a specific channel into PGRAPH - * XXX: fails sometimes.. not sure why - */ +/* Restore the context for a specific channel into PGRAPH */ int nv40_graph_load_context(struct nouveau_channel *chan) { |