summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-08-26 15:02:32 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-08-27 08:39:23 +1000
commitab699ec64a4294f2f6ccd34b9bf8a2dcb4c4cb3c (patch)
treedd351df0c2dd1f8b0a9c2dbfa85039140dc34ab0 /drivers
parente3461a2bc0d67ce60a915e0f26e2a6eb4a4d4b99 (diff)
drm/nouveau: drop drm_global_mutex before sleeping in submission path
If we keep hold of the mutex here, the process which currently holds the buffer object will never be able to release it, causing a deadlock. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 613f878e6d0..93711dfcafc 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -337,7 +337,9 @@ retry:
return -EINVAL;
}
+ mutex_unlock(&drm_global_mutex);
ret = ttm_bo_wait_cpu(&nvbo->bo, false);
+ mutex_lock(&drm_global_mutex);
if (ret) {
NV_ERROR(dev, "fail wait_cpu\n");
return ret;