]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/msm/dsi: fix direct caller of msm_gem_free_object()
authorRob Clark <robdclark@gmail.com>
Wed, 14 Feb 2018 16:14:23 +0000 (11:14 -0500)
committerRob Clark <robdclark@gmail.com>
Mon, 19 Mar 2018 10:33:36 +0000 (06:33 -0400)
This should be using drm_gem_object_put().  Also since this is done only
in driver unload path, we don't need to synchronize setting tx_gem_obj
to NULL, so juse use the _unlocked() variant.

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/dsi_host.c
drivers/gpu/drm/msm/msm_gem.c

index 62ac614eccf94611a31ff2f61f7c6f20e3ede73f..7a03a94897088a474aa966ea86f778e5dde238e9 100644 (file)
@@ -1063,10 +1063,8 @@ static void dsi_tx_buf_free(struct msm_dsi_host *msm_host)
 
        if (msm_host->tx_gem_obj) {
                msm_gem_put_iova(msm_host->tx_gem_obj, 0);
-               mutex_lock(&dev->struct_mutex);
-               msm_gem_free_object(msm_host->tx_gem_obj);
+               drm_gem_object_put_unlocked(msm_host->tx_gem_obj);
                msm_host->tx_gem_obj = NULL;
-               mutex_unlock(&dev->struct_mutex);
        }
 
        if (msm_host->tx_buf)
index 0e5073af391344f681226020e8489c7a43a9944d..95196479f651b18697229765432a0493f6b7d4ce 100644 (file)
@@ -798,6 +798,7 @@ void msm_gem_describe_objects(struct list_head *list, struct seq_file *m)
 }
 #endif
 
+/* don't call directly!  Use drm_gem_object_put() and friends */
 void msm_gem_free_object(struct drm_gem_object *obj)
 {
        struct drm_device *dev = obj->dev;