diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-08-26 07:02:32 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-08-27 00:39:23 +0200 |
commit | ab699ec64a4294f2f6ccd34b9bf8a2dcb4c4cb3c (patch) | |
tree | dd351df0c2dd1f8b0a9c2dbfa85039140dc34ab0 /drivers/gpu | |
parent | drm: export drm_global_mutex for drivers to use (diff) | |
download | linux-ab699ec64a4294f2f6ccd34b9bf8a2dcb4c4cb3c.tar.xz 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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.c | 2 |
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; |