Lines Matching refs:bman

35 	struct i915_ttm_buddy_manager *bman = to_buddy_manager(man);  in i915_ttm_buddy_man_alloc()  local
37 struct i915_buddy_mm *mm = &bman->mm; in i915_ttm_buddy_man_alloc()
57 min_page_size = bman->default_page_size; in i915_ttm_buddy_man_alloc()
84 mutex_lock(&bman->lock); in i915_ttm_buddy_man_alloc()
86 mutex_unlock(&bman->lock); in i915_ttm_buddy_man_alloc()
108 mutex_lock(&bman->lock); in i915_ttm_buddy_man_alloc()
110 mutex_unlock(&bman->lock); in i915_ttm_buddy_man_alloc()
120 struct i915_ttm_buddy_manager *bman = to_buddy_manager(man); in i915_ttm_buddy_man_free() local
122 mutex_lock(&bman->lock); in i915_ttm_buddy_man_free()
123 i915_buddy_free_list(&bman->mm, &bman_res->blocks); in i915_ttm_buddy_man_free()
124 mutex_unlock(&bman->lock); in i915_ttm_buddy_man_free()
132 struct i915_ttm_buddy_manager *bman = to_buddy_manager(man); in i915_ttm_buddy_man_debug() local
135 mutex_lock(&bman->lock); in i915_ttm_buddy_man_debug()
137 bman->default_page_size >> 10); in i915_ttm_buddy_man_debug()
139 i915_buddy_print(&bman->mm, printer); in i915_ttm_buddy_man_debug()
142 list_for_each_entry(block, &bman->reserved, link) in i915_ttm_buddy_man_debug()
143 i915_buddy_block_print(&bman->mm, block, printer); in i915_ttm_buddy_man_debug()
144 mutex_unlock(&bman->lock); in i915_ttm_buddy_man_debug()
186 struct i915_ttm_buddy_manager *bman; in i915_ttm_buddy_man_init() local
189 bman = kzalloc(sizeof(*bman), GFP_KERNEL); in i915_ttm_buddy_man_init()
190 if (!bman) in i915_ttm_buddy_man_init()
193 err = i915_buddy_init(&bman->mm, size, chunk_size); in i915_ttm_buddy_man_init()
197 mutex_init(&bman->lock); in i915_ttm_buddy_man_init()
198 INIT_LIST_HEAD(&bman->reserved); in i915_ttm_buddy_man_init()
200 bman->default_page_size = default_page_size; in i915_ttm_buddy_man_init()
202 man = &bman->manager; in i915_ttm_buddy_man_init()
205 ttm_resource_manager_init(man, bman->mm.size >> PAGE_SHIFT); in i915_ttm_buddy_man_init()
213 kfree(bman); in i915_ttm_buddy_man_init()
230 struct i915_ttm_buddy_manager *bman = to_buddy_manager(man); in i915_ttm_buddy_man_fini() local
231 struct i915_buddy_mm *mm = &bman->mm; in i915_ttm_buddy_man_fini()
242 mutex_lock(&bman->lock); in i915_ttm_buddy_man_fini()
243 i915_buddy_free_list(mm, &bman->reserved); in i915_ttm_buddy_man_fini()
245 mutex_unlock(&bman->lock); in i915_ttm_buddy_man_fini()
248 kfree(bman); in i915_ttm_buddy_man_fini()
266 struct i915_ttm_buddy_manager *bman = to_buddy_manager(man); in i915_ttm_buddy_man_reserve() local
267 struct i915_buddy_mm *mm = &bman->mm; in i915_ttm_buddy_man_reserve()
270 mutex_lock(&bman->lock); in i915_ttm_buddy_man_reserve()
271 ret = i915_buddy_alloc_range(mm, &bman->reserved, start, size); in i915_ttm_buddy_man_reserve()
272 mutex_unlock(&bman->lock); in i915_ttm_buddy_man_reserve()