summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_info.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-15 02:02:44 +0400
committerDave Airlie <airlied@redhat.com>2013-08-21 06:58:01 +0400
commitcd4f013f3a4b6a55d484cc2e206dc08e055e5291 (patch)
tree1af8117ef7955b830c9af6a54a9cafe24943641d /drivers/gpu/drm/drm_info.c
parent84341c280acb8217a301344082c7ad8b9af870a6 (diff)
downloadlinux-cd4f013f3a4b6a55d484cc2e206dc08e055e5291.tar.xz
drm/gem: switch dev->object_name_lock to a mutex
I want to wrap the creation of a dma-buf from a gem object in it, so that the obj->export_dma_buf cache can be atomically filled in. Instead of creating a new mutex just for that variable I've figured I can reuse the existing dev->object_name_lock, especially since the new semantics will exactly mirror the flink obj->name already protected by that lock. v2: idr_preload/idr_preload_end is now an atomic section, so need to move the mutex locking outside. [airlied: fix up conflict with patch to make debugfs use lock] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_info.c')
-rw-r--r--drivers/gpu/drm/drm_info.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
index 5351e811c421..53298320080b 100644
--- a/drivers/gpu/drm/drm_info.c
+++ b/drivers/gpu/drm/drm_info.c
@@ -219,9 +219,9 @@ int drm_gem_name_info(struct seq_file *m, void *data)
seq_printf(m, " name size handles refcount\n");
- spin_lock(&dev->object_name_lock);
+ mutex_lock(&dev->object_name_lock);
idr_for_each(&dev->object_name_idr, drm_gem_one_name_info, m);
- spin_unlock(&dev->object_name_lock);
+ mutex_unlock(&dev->object_name_lock);
return 0;
}