• Home
  • Raw
  • Download

Lines Matching refs:mo

76 	struct i915_mmu_object *mo = container_of(work, typeof(*mo), work);  in cancel_userptr()  local
77 struct drm_i915_gem_object *obj = mo->obj; in cancel_userptr()
96 static void add_object(struct i915_mmu_object *mo) in add_object() argument
98 if (mo->attached) in add_object()
101 interval_tree_insert(&mo->it, &mo->mn->objects); in add_object()
102 mo->attached = true; in add_object()
105 static void del_object(struct i915_mmu_object *mo) in del_object() argument
107 if (!mo->attached) in del_object()
110 interval_tree_remove(&mo->it, &mo->mn->objects); in del_object()
111 mo->attached = false; in del_object()
121 struct i915_mmu_object *mo; in i915_gem_userptr_mn_invalidate_range_start() local
143 mo = container_of(it, struct i915_mmu_object, it); in i915_gem_userptr_mn_invalidate_range_start()
144 if (kref_get_unless_zero(&mo->obj->base.refcount)) in i915_gem_userptr_mn_invalidate_range_start()
145 queue_work(mn->wq, &mo->work); in i915_gem_userptr_mn_invalidate_range_start()
147 list_add(&mo->link, &cancelled); in i915_gem_userptr_mn_invalidate_range_start()
150 list_for_each_entry(mo, &cancelled, link) in i915_gem_userptr_mn_invalidate_range_start()
151 del_object(mo); in i915_gem_userptr_mn_invalidate_range_start()
194 struct i915_mmu_object *mo; in i915_gem_userptr_release__mmu_notifier() local
196 mo = obj->userptr.mmu_object; in i915_gem_userptr_release__mmu_notifier()
197 if (mo == NULL) in i915_gem_userptr_release__mmu_notifier()
200 spin_lock(&mo->mn->lock); in i915_gem_userptr_release__mmu_notifier()
201 del_object(mo); in i915_gem_userptr_release__mmu_notifier()
202 spin_unlock(&mo->mn->lock); in i915_gem_userptr_release__mmu_notifier()
203 kfree(mo); in i915_gem_userptr_release__mmu_notifier()
235 struct i915_mmu_object *mo; in i915_gem_userptr_init__mmu_notifier() local
247 mo = kzalloc(sizeof(*mo), GFP_KERNEL); in i915_gem_userptr_init__mmu_notifier()
248 if (mo == NULL) in i915_gem_userptr_init__mmu_notifier()
251 mo->mn = mn; in i915_gem_userptr_init__mmu_notifier()
252 mo->obj = obj; in i915_gem_userptr_init__mmu_notifier()
253 mo->it.start = obj->userptr.ptr; in i915_gem_userptr_init__mmu_notifier()
254 mo->it.last = obj->userptr.ptr + obj->base.size - 1; in i915_gem_userptr_init__mmu_notifier()
255 INIT_WORK(&mo->work, cancel_userptr); in i915_gem_userptr_init__mmu_notifier()
257 obj->userptr.mmu_object = mo; in i915_gem_userptr_init__mmu_notifier()