summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_graph.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2010-01-11 21:18:53 +0100
committerBen Skeggs <bskeggs@redhat.com>2010-01-14 09:48:21 +0100
commit0a90dc51aa3162abb7cd64323ba2e6674e1c5ff4 (patch)
tree31fe16e9d83d601e3a60f0f924966a6023aee2b2 /drivers/gpu/drm/nouveau/nv50_graph.c
parentdrm/nv04: Fix set_operation software method. (diff)
downloadlinux-0a90dc51aa3162abb7cd64323ba2e6674e1c5ff4.tar.xz
linux-0a90dc51aa3162abb7cd64323ba2e6674e1c5ff4.zip
drm/nv50: wait for pgraph to idle before unloading the context
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>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_graph.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_graph.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c
index ca79f32be44c..56a9753db23c 100644
--- a/drivers/gpu/drm/nouveau/nv50_graph.c
+++ b/drivers/gpu/drm/nouveau/nv50_graph.c
@@ -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);