소스 검색

drm/nouveau: fix engine context destructor ordering

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 13 년 전
부모
커밋
f51ee65c75
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      drivers/gpu/drm/nouveau/nouveau_channel.c

+ 1 - 2
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 */