summaryrefslogtreecommitdiffstats
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
parente3461a2bc0d67ce60a915e0f26e2a6eb4a4d4b99 (diff)
downloadblackbird-op-linux-ab699ec64a4294f2f6ccd34b9bf8a2dcb4c4cb3c.tar.gz
blackbird-op-linux-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>
-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;
OpenPOWER on IntegriCloud