Skip to content

Commit

Permalink
drm/nv50: wait for pgraph to idle before unloading the context
Browse files Browse the repository at this point in the history
This should fix the problem with gpu hangs people have had when closing
channels.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Maarten Maathuis authored and Ben Skeggs committed Jan 14, 2010
1 parent fe5a64a commit 0a90dc5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/nv50_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev)
return 0;
inst &= NV50_PGRAPH_CTXCTL_CUR_INSTANCE;

nouveau_wait_for_idle(dev);
nv_wr32(dev, 0x400500, fifo & ~1);
nv_wr32(dev, 0x400784, inst);
nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) | 0x20);
Expand Down

0 comments on commit 0a90dc5

Please sign in to comment.