summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-10-12 08:01:59 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 15:05:24 +1000
commit08cd3d4311fb9c5038bc6fb0c83c250cfb218da2 (patch)
tree5ad1e02aff963f6604e26b1d379e818a21cc4bd2
parent21e86c1c8a844bf978f8fc431a59c9f5a578812d (diff)
drm/nouveau: fix thinko in channel locking in semaphore path
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fence.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 42694b122ee..5f9f66f3506 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -393,23 +393,23 @@ nouveau_fence_sync(struct nouveau_fence *fence,
return nouveau_fence_wait(fence, NULL, false, false);
}
- /* try to take wchan's mutex, if we can't take it right away
+ /* try to take chan's mutex, if we can't take it right away
* we have to fallback to software sync to prevent locking
* order issues
*/
- if (!mutex_trylock(&wchan->mutex)) {
+ if (!mutex_trylock(&chan->mutex)) {
free_semaphore(&sema->ref);
return nouveau_fence_wait(fence, NULL, false, false);
}
/* Make wchan wait until it gets signalled */
ret = emit_semaphore(wchan, NV_SW_SEMAPHORE_ACQUIRE, sema);
- mutex_unlock(&wchan->mutex);
if (ret)
goto out;
/* Signal the semaphore from chan */
ret = emit_semaphore(chan, NV_SW_SEMAPHORE_RELEASE, sema);
+ mutex_unlock(&chan->mutex);
out:
kref_put(&sema->ref, free_semaphore);
return ret;