aboutsummaryrefslogtreecommitdiffstats
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
parentdrm: export drm_global_mutex for drivers to use (diff)
downloadlinux-dev-ab699ec64a4294f2f6ccd34b9bf8a2dcb4c4cb3c.tar.xz
linux-dev-ab699ec64a4294f2f6ccd34b9bf8a2dcb4c4cb3c.zip
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 613f878e6d0f..93711dfcafc1 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;