summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-15 00:02:34 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-21 19:13:42 +0900
commit960de89f44b5cbdad2cf286861b929505b5ad9be (patch)
treebda1321451a7be94adfc625fdcfe9795425aa0e6 /include
parentc5d41019ff75931541cdd89307573969cd7511f1 (diff)
downloadlinux-3.10-960de89f44b5cbdad2cf286861b929505b5ad9be.tar.gz
linux-3.10-960de89f44b5cbdad2cf286861b929505b5ad9be.tar.bz2
linux-3.10-960de89f44b5cbdad2cf286861b929505b5ad9be.zip
drm/gem: move drm_gem_object_handle_unreference_unlocked into drm_gem.c
We have three callers of this function now and it's neither performance critical nor really small. So an inline function feels like overkill and unecessarily separates the different parts of the code. Since all callers of drm_gem_object_handle_free are now in drm_gem.c we can make that static (and remove the unused EXPORT_SYMBOL). To avoid a forward declaration move it (and drm_gem_object_free_bug) up a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drmP.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 1128508e1b3..2a72a8eec69 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1674,7 +1674,6 @@ int drm_gem_object_init(struct drm_device *dev,
struct drm_gem_object *obj, size_t size);
void drm_gem_private_object_init(struct drm_device *dev,
struct drm_gem_object *obj, size_t size);
-void drm_gem_object_handle_free(struct drm_gem_object *obj);
void drm_gem_vm_open(struct vm_area_struct *vma);
void drm_gem_vm_close(struct vm_area_struct *vma);
int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
@@ -1719,25 +1718,7 @@ drm_gem_object_handle_reference(struct drm_gem_object *obj)
atomic_inc(&obj->handle_count);
}
-static inline void
-drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj)
-{
- if (obj == NULL)
- return;
-
- if (atomic_read(&obj->handle_count) == 0)
- return;
-
- /*
- * Must bump handle count first as this may be the last
- * ref, in which case the object would disappear before we
- * checked for a name
- */
-
- if (atomic_dec_and_test(&obj->handle_count))
- drm_gem_object_handle_free(obj);
- drm_gem_object_unreference_unlocked(obj);
-}
+void drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj);
void drm_gem_free_mmap_offset(struct drm_gem_object *obj);
int drm_gem_create_mmap_offset(struct drm_gem_object *obj);