Lines Matching refs:ref
78 int drm_global_item_ref(struct drm_global_reference *ref) in drm_global_item_ref() argument
81 struct drm_global_item *item = &glob[ref->global_type]; in drm_global_item_ref()
85 ref->object = kzalloc(ref->size, GFP_KERNEL); in drm_global_item_ref()
86 if (unlikely(ref->object == NULL)) { in drm_global_item_ref()
90 ret = ref->init(ref); in drm_global_item_ref()
94 item->object = ref->object; in drm_global_item_ref()
96 ref->object = item->object; in drm_global_item_ref()
104 kfree(ref->object); in drm_global_item_ref()
105 ref->object = NULL; in drm_global_item_ref()
123 void drm_global_item_unref(struct drm_global_reference *ref) in drm_global_item_unref() argument
125 struct drm_global_item *item = &glob[ref->global_type]; in drm_global_item_unref()
129 BUG_ON(ref->object != item->object); in drm_global_item_unref()
131 ref->release(ref); in drm_global_item_unref()