Lines Matching refs:mm
93 struct drm_gem_mm *mm; in drm_gem_init() local
98 mm = kzalloc(sizeof(struct drm_gem_mm), GFP_KERNEL); in drm_gem_init()
99 if (!mm) { in drm_gem_init()
104 dev->mm_private = mm; in drm_gem_init()
106 if (drm_ht_create(&mm->offset_hash, 12)) { in drm_gem_init()
107 kfree(mm); in drm_gem_init()
111 if (drm_mm_init(&mm->offset_manager, DRM_FILE_PAGE_OFFSET_START, in drm_gem_init()
113 drm_ht_remove(&mm->offset_hash); in drm_gem_init()
114 kfree(mm); in drm_gem_init()
124 struct drm_gem_mm *mm = dev->mm_private; in drm_gem_destroy() local
126 drm_mm_takedown(&mm->offset_manager); in drm_gem_destroy()
127 drm_ht_remove(&mm->offset_hash); in drm_gem_destroy()
128 kfree(mm); in drm_gem_destroy()
312 struct drm_gem_mm *mm = dev->mm_private; in drm_gem_free_mmap_offset() local
315 drm_ht_remove_item(&mm->offset_hash, &list->hash); in drm_gem_free_mmap_offset()
337 struct drm_gem_mm *mm = dev->mm_private; in drm_gem_create_mmap_offset() local
354 list->file_offset_node = drm_mm_search_free(&mm->offset_manager, in drm_gem_create_mmap_offset()
371 ret = drm_ht_insert_item(&mm->offset_hash, &list->hash); in drm_gem_create_mmap_offset()
666 struct drm_gem_mm *mm = dev->mm_private; in drm_gem_mmap() local
677 if (drm_ht_find_item(&mm->offset_hash, vma->vm_pgoff, &hash)) { in drm_gem_mmap()