summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-05-03 16:54:15 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-05-24 16:55:55 +1000
commitf51ee65c75d42633e693dd1704772ad241d9748a (patch)
tree2191b5399341d06795c2c00d7aaa5dc47448e841
parent5e120f6e4b3f35b741c5445dfc755f50128c3c44 (diff)
drm/nouveau: fix engine context destructor ordering
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_channel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index d25dc249535b..5762547ed8af 100644
--- a/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -307,8 +307,7 @@ nouveau_channel_put_unlocked(struct nouveau_channel **pchan)
pfifo->reassign(dev, false);
/* destroy the engine specific contexts */
- pfifo->destroy_context(chan);
- for (i = 0; i < NVOBJ_ENGINE_NR; i++) {
+ for (i = NVOBJ_ENGINE_NR - 1; i >= 0; i--) {
if (chan->engctx[i])
dev_priv->eng[i]->context_del(chan, i);
/*XXX: clean this up later, order is important */