summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/drm.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 10:32:48 +0100
committerThierry Reding <treding@nvidia.com>2015-12-14 10:50:37 +0100
commita07cdfe5389e0ca43f525c7d1da0930b7447e0c8 (patch)
tree062689e1ea9614fcb2635e05268f03e95ad8b12a /drivers/gpu/drm/tegra/drm.c
parentdrm/tegra: Don't take dev->struct_mutex in mmap offset ioctl (diff)
downloadlinux-a07cdfe5389e0ca43f525c7d1da0930b7447e0c8.tar.xz
linux-a07cdfe5389e0ca43f525c7d1da0930b7447e0c8.zip
drm/tegra: Use drm_gem_object_unreference_unlocked()
This only grabs the mutex when really needed, but still has a might- acquire lockdep check to make sure that's always possible. With this patch Tegra DRM is officially struct_mutex free, yay! v2: refernce_unlocked doesn't exist as kbuild spotted. Cc: Thierry Reding <thierry.reding@gmail.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> [treding@nvidia.com: remove unused variables] Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.c')
-rw-r--r--drivers/gpu/drm/tegra/drm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index b26f62e7334d..c4910d528411 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -277,9 +277,7 @@ host1x_bo_lookup(struct drm_device *drm, struct drm_file *file, u32 handle)
if (!gem)
return NULL;
- mutex_lock(&drm->struct_mutex);
- drm_gem_object_unreference(gem);
- mutex_unlock(&drm->struct_mutex);
+ drm_gem_object_unreference_unlocked(gem);
bo = to_tegra_bo(gem);
return &bo->base;