From: Ben Skeggs Date: Thu, 26 Aug 2010 05:02:32 +0000 (+1000) Subject: drm/nouveau: drop drm_global_mutex before sleeping in submission path X-Git-Tag: upstream/snapshot3+hdmi~13102^2~4^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab699ec64a4294f2f6ccd34b9bf8a2dcb4c4cb3c;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 --- diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 613f878..93711df 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;