[Freedreno] [PATCH RESEND 06/10] drm/msm: Fix deadlock calling msm_gem_new()

Sean Paul seanpaul at chromium.org
Wed Feb 21 15:18:34 UTC 2018


msm_gem_new() acquires the struct_mutex, so surrounding this call with
locks causes deadlocks all day long.

Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
index fc2efec6360b..bb4547748ce9 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
@@ -601,10 +601,8 @@ static struct dpu_reg_dma_buffer *alloc_reg_dma_buf_v1(u32 size)
 	if (!dma_buf)
 		return ERR_PTR(-ENOMEM);
 
-	mutex_lock(&reg_dma->drm_dev->struct_mutex);
 	dma_buf->buf = msm_gem_new(reg_dma->drm_dev,
 				    rsize, MSM_BO_UNCACHED);
-	mutex_unlock(&reg_dma->drm_dev->struct_mutex);
 	if (IS_ERR_OR_NULL(dma_buf->buf)) {
 		rc = -EINVAL;
 		goto fail;
-- 
2.16.1.291.g4437f3f132-goog



More information about the Freedreno mailing list