path: root/drivers/gpu/drm/msm/dsi/dsi_host.c
diff options
authorSushmita Susheelendra <>2017-06-13 16:52:54 -0600
committerRob Clark <>2017-06-17 08:03:07 -0400
commit0e08270a1f01bceae17d32a0d75aad2388bd1ba2 (patch)
tree31f17b04f1a459ca5ab26772626c8ece4c54158a /drivers/gpu/drm/msm/dsi/dsi_host.c
parent816fa34c051492c7f115ad2fd91c9e723d7fc298 (diff)
drm/msm: Separate locking of buffer resources from struct_mutex
Buffer object specific resources like pages, domains, sg list need not be protected with struct_mutex. They can be protected with a buffer object level lock. This simplifies locking and makes it easier to avoid potential recursive locking scenarios for SVM involving mmap_sem and struct_mutex. This also removes unnecessary serialization when creating buffer objects, and also between buffer object creation and GPU command submission. Signed-off-by: Sushmita Susheelendra <> [robclark: squash in handling new locking for shrinker] Signed-off-by: Rob Clark <>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_host.c')
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 2e7077194b21..9e9c5696bc03 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -982,18 +982,16 @@ static int dsi_tx_buf_alloc(struct msm_dsi_host *msm_host, int size)
uint64_t iova;
if (cfg_hnd->major == MSM_DSI_VER_MAJOR_6G) {
- mutex_lock(&dev->struct_mutex);
msm_host->tx_gem_obj = msm_gem_new(dev, size, MSM_BO_UNCACHED);
if (IS_ERR(msm_host->tx_gem_obj)) {
ret = PTR_ERR(msm_host->tx_gem_obj);
pr_err("%s: failed to allocate gem, %d\n",
__func__, ret);
msm_host->tx_gem_obj = NULL;
- mutex_unlock(&dev->struct_mutex);
return ret;
- ret = msm_gem_get_iova_locked(msm_host->tx_gem_obj,
+ ret = msm_gem_get_iova(msm_host->tx_gem_obj,
priv->kms->aspace, &iova);
if (ret) {