aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_debugfs.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-05-26 12:54:33 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-06-28 06:41:05 -0400
commit3cbd0c587b129beaefb1405bbe43831e6bc9461e (patch)
treed31a45987312997a69db3959a37b09ac06f0952c /drivers/gpu/drm/omapdrm/omap_debugfs.c
parentdc8c9aeee5098688c1085691213fb9a703bf20ad (diff)
drm/omap: gem: Replace struct_mutex usage with omap_obj private lock
The DRM device struct_mutex is used to protect against concurrent GEM object operations that deal with memory allocation and pinning. All those operations are local to a GEM object and don't need to be serialized across different GEM objects. Replace the struct_mutex with a local omap_obj.lock or drop it altogether where not needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_debugfs.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_debugfs.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c
index b42e286616b0..95ade441caa8 100644
--- a/drivers/gpu/drm/omapdrm/omap_debugfs.c
+++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c
@@ -30,17 +30,10 @@ static int gem_show(struct seq_file *m, void *arg)
30 struct drm_info_node *node = (struct drm_info_node *) m->private; 30 struct drm_info_node *node = (struct drm_info_node *) m->private;
31 struct drm_device *dev = node->minor->dev; 31 struct drm_device *dev = node->minor->dev;
32 struct omap_drm_private *priv = dev->dev_private; 32 struct omap_drm_private *priv = dev->dev_private;
33 int ret;
34
35 ret = mutex_lock_interruptible(&dev->struct_mutex);
36 if (ret)
37 return ret;
38 33
39 seq_printf(m, "All Objects:\n"); 34 seq_printf(m, "All Objects:\n");
40 omap_gem_describe_objects(&priv->obj_list, m); 35 omap_gem_describe_objects(&priv->obj_list, m);
41 36
42 mutex_unlock(&dev->struct_mutex);
43
44 return 0; 37 return 0;
45} 38}
46 39