Commit 0e3089fa authored by Daniel Vetter's avatar Daniel Vetter

drm/gma500: Drop dev->struct_mutex from mmap offset function

Simply forgotten about this when I was doing my general cleansing of
simple gem mmap offset functions. There's nothing but core functions
called here, and they all have their own protection already.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Acked-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448271183-20523-20-git-send-email-daniel.vetter@ffwll.ch
parent 46a0f223
...@@ -62,15 +62,10 @@ int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev, ...@@ -62,15 +62,10 @@ int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
int ret = 0; int ret = 0;
struct drm_gem_object *obj; struct drm_gem_object *obj;
mutex_lock(&dev->struct_mutex);
/* GEM does all our handle to object mapping */ /* GEM does all our handle to object mapping */
obj = drm_gem_object_lookup(dev, file, handle); obj = drm_gem_object_lookup(dev, file, handle);
if (obj == NULL) { if (obj == NULL)
ret = -ENOENT; return -ENOENT;
goto unlock;
}
/* What validation is needed here ? */
/* Make it mmapable */ /* Make it mmapable */
ret = drm_gem_create_mmap_offset(obj); ret = drm_gem_create_mmap_offset(obj);
...@@ -78,9 +73,7 @@ int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev, ...@@ -78,9 +73,7 @@ int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
goto out; goto out;
*offset = drm_vma_node_offset_addr(&obj->vma_node); *offset = drm_vma_node_offset_addr(&obj->vma_node);
out: out:
drm_gem_object_unreference(obj); drm_gem_object_unreference_unlocked(obj);
unlock:
mutex_unlock(&dev->struct_mutex);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment