aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-11-27 11:05:36 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-11-29 09:58:12 +1000
commitedc260d06181cbf38d5cd326e6cf824d8e2e0eaf (patch)
tree2d840c53ad09f1bdc02a29948bdd0d1f0349d329 /drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
parentc9aa763fe9690a334d0636f88e6eb85340f36f89 (diff)
downloadvexpress-lsk-edc260d06181cbf38d5cd326e6cf824d8e2e0eaf.tar.gz
drm/nouveau/fifo: trigger engine context unload before zeroing context pointer
Fixes a PCE0 page fault noticed on NVD9 during module unload. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c')
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
index 9df59c028e4..c930da99c2c 100644
--- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
@@ -182,10 +182,6 @@ nve0_fifo_context_detach(struct nouveau_object *parent, bool suspend,
return -EINVAL;
}
- nv_wo32(base, addr + 0x00, 0x00000000);
- nv_wo32(base, addr + 0x04, 0x00000000);
- bar->flush(bar);
-
nv_wr32(priv, 0x002634, chan->base.chid);
if (!nv_wait(priv, 0x002634, 0xffffffff, chan->base.chid)) {
nv_error(priv, "channel %d kick timeout\n", chan->base.chid);
@@ -193,6 +189,9 @@ nve0_fifo_context_detach(struct nouveau_object *parent, bool suspend,
return -EBUSY;
}
+ nv_wo32(base, addr + 0x00, 0x00000000);
+ nv_wo32(base, addr + 0x04, 0x00000000);
+ bar->flush(bar);
return 0;
}