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>
This commit is contained in:
Ben Skeggs 2010-08-26 15:02:32 +10:00
parent e3461a2bc0
commit ab699ec64a

View file

@ -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;