• Home
  • Raw
  • Download

Lines Matching refs:mm

27 		obj->mm.madv = I915_MADV_DONTNEED;  in __i915_gem_object_set_pages()
37 obj->mm.get_page.sg_pos = pages->sgl; in __i915_gem_object_set_pages()
38 obj->mm.get_page.sg_idx = 0; in __i915_gem_object_set_pages()
39 obj->mm.get_dma_page.sg_pos = pages->sgl; in __i915_gem_object_set_pages()
40 obj->mm.get_dma_page.sg_idx = 0; in __i915_gem_object_set_pages()
42 obj->mm.pages = pages; in __i915_gem_object_set_pages()
45 obj->mm.page_sizes.phys = sg_page_sizes; in __i915_gem_object_set_pages()
55 obj->mm.page_sizes.sg = 0; in __i915_gem_object_set_pages()
57 if (obj->mm.page_sizes.phys & ~0u << i) in __i915_gem_object_set_pages()
58 obj->mm.page_sizes.sg |= BIT(i); in __i915_gem_object_set_pages()
60 GEM_BUG_ON(!HAS_PAGE_SIZES(i915, obj->mm.page_sizes.sg)); in __i915_gem_object_set_pages()
68 GEM_BUG_ON(!list_empty(&obj->mm.link)); in __i915_gem_object_set_pages()
69 atomic_inc(&obj->mm.shrink_pin); in __i915_gem_object_set_pages()
78 spin_lock_irqsave(&i915->mm.obj_lock, flags); in __i915_gem_object_set_pages()
80 i915->mm.shrink_count++; in __i915_gem_object_set_pages()
81 i915->mm.shrink_memory += obj->base.size; in __i915_gem_object_set_pages()
83 if (obj->mm.madv != I915_MADV_WILLNEED) in __i915_gem_object_set_pages()
84 list = &i915->mm.purge_list; in __i915_gem_object_set_pages()
86 list = &i915->mm.shrink_list; in __i915_gem_object_set_pages()
87 list_add_tail(&obj->mm.link, list); in __i915_gem_object_set_pages()
89 atomic_set(&obj->mm.shrink_pin, 0); in __i915_gem_object_set_pages()
90 spin_unlock_irqrestore(&i915->mm.obj_lock, flags); in __i915_gem_object_set_pages()
101 if (unlikely(obj->mm.madv != I915_MADV_WILLNEED)) { in ____i915_gem_object_get_pages()
137 atomic_inc(&obj->mm.pages_pin_count); in __i915_gem_object_get_pages()
185 radix_tree_for_each_slot(slot, &obj->mm.get_page.radix, &iter, 0) in __i915_gem_object_reset_page_iter()
186 radix_tree_delete(&obj->mm.get_page.radix, iter.index); in __i915_gem_object_reset_page_iter()
187 radix_tree_for_each_slot(slot, &obj->mm.get_dma_page.radix, &iter, 0) in __i915_gem_object_reset_page_iter()
188 radix_tree_delete(&obj->mm.get_dma_page.radix, iter.index); in __i915_gem_object_reset_page_iter()
205 pages = fetch_and_zero(&obj->mm.pages); in __i915_gem_object_unset_pages()
210 obj->mm.madv = I915_MADV_WILLNEED; in __i915_gem_object_unset_pages()
214 if (obj->mm.mapping) { in __i915_gem_object_unset_pages()
215 unmap_object(obj, page_mask_bits(obj->mm.mapping)); in __i915_gem_object_unset_pages()
216 obj->mm.mapping = NULL; in __i915_gem_object_unset_pages()
220 obj->mm.page_sizes.phys = obj->mm.page_sizes.sg = 0; in __i915_gem_object_unset_pages()
296 if (n_pages == 1 && !PageHighMem(sg_page(obj->mm.pages->sgl))) in i915_gem_object_map_page()
297 return page_address(sg_page(obj->mm.pages->sgl)); in i915_gem_object_map_page()
313 for_each_sgt_page(page, iter, obj->mm.pages) in i915_gem_object_map_page()
325 resource_size_t iomap = obj->mm.region->iomap.base - in i915_gem_object_map_pfn()
326 obj->mm.region->region.start; in i915_gem_object_map_pfn()
343 for_each_sgt_daddr(addr, iter, obj->mm.pages) in i915_gem_object_map_pfn()
370 if (!atomic_inc_not_zero(&obj->mm.pages_pin_count)) { in i915_gem_object_pin_map()
380 atomic_inc(&obj->mm.pages_pin_count); in i915_gem_object_pin_map()
403 if (type != I915_MAP_WC && !obj->mm.n_placements) { in i915_gem_object_pin_map()
413 ptr = page_unpack_bits(obj->mm.mapping, &has_type); in i915_gem_object_pin_map()
422 ptr = obj->mm.mapping = NULL; in i915_gem_object_pin_map()
436 obj->mm.mapping = page_pack_bits(ptr, type); in i915_gem_object_pin_map()
442 atomic_dec(&obj->mm.pages_pin_count); in i915_gem_object_pin_map()
470 obj->mm.dirty = true; in __i915_gem_object_flush_map()
475 ptr = page_unpack_bits(obj->mm.mapping, &has_type); in __i915_gem_object_flush_map()
488 GEM_BUG_ON(!obj->mm.mapping); in __i915_gem_object_release_map()
496 unmap_object(obj, page_mask_bits(fetch_and_zero(&obj->mm.mapping))); in __i915_gem_object_release_map()
636 if (!obj->mm.dirty) in i915_gem_object_get_dirty_page()