From: Francisco Jerez Date: Sun, 4 Jul 2010 10:54:23 +0000 (+0200) Subject: drm/nouveau: Move the fence wait before migration resource clean-up. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=311ab6943fad769a1435bb375d3c821f3b41cdde;p=linux-beck.git drm/nouveau: Move the fence wait before migration resource clean-up. Avoids an oops in the fence wait failure path (bug 26521). Signed-off-by: Francisco Jerez Tested-by: Marcin Slusarz Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 9f5ab4677758..1371c77295f2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -461,9 +461,9 @@ nouveau_bo_move_accel_cleanup(struct nouveau_channel *chan, return ret; ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, - evict, no_wait_reserve, no_wait_gpu, new_mem); - if (nvbo->channel && nvbo->channel != chan) - ret = nouveau_fence_wait(fence, NULL, false, false); + evict || (nvbo->channel && + nvbo->channel != chan), + no_wait_reserve, no_wait_gpu, new_mem); nouveau_fence_unref((void *)&fence); return ret; }