From: Maarten Maathuis Date: Mon, 11 Jan 2010 20:18:53 +0000 (+0100) Subject: drm/nv50: wait for pgraph to idle before unloading the context X-Git-Tag: v2.6.33-rc6~27^2~11^2~13 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0a90dc51aa3162abb7cd64323ba2e6674e1c5ff4;p=~shefty%2Frdma-dev.git 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 Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c index ca79f32be44..56a9753db23 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);