From 1c4bdd9a93d13e838dd4bdd296f857c45ec1f314 Mon Sep 17 00:00:00 2001 From: Kostadin Atanasov Date: Sun, 24 Nov 2013 14:04:40 +0200 Subject: [PATCH 2/2] better multithreaded protection for fence channel Signed-off-by: Kostadin Atanasov --- drivers/gpu/drm/nouveau/nouveau_fence.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index 0c4532c..366e74b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -248,7 +248,10 @@ nouveau_fence_wait(struct nouveau_fence *fence, bool lazy, bool intr) while (priv && priv->uevent && lazy && !nouveau_fence_done(fence)) { spin_lock(&fence->chlock); - ret = nouveau_fence_wait_uevent(fence, intr); + if (fence->channel) + ret = nouveau_fence_wait_uevent(fence, intr); + else + priv = NULL; spin_unlock(&fence->chlock); if (ret < 0) return ret; -- 1.8.4.2