Lines Matching full:pages
37 WARN_ON(gem->pages); in vkms_gem_free_object()
61 if (obj->pages) { in vkms_gem_fault()
62 get_page(obj->pages[page_offset]); in vkms_gem_fault()
63 vmf->page = obj->pages[page_offset]; in vkms_gem_fault()
155 if (!vkms_obj->pages) { in _get_pages()
156 struct page **pages = drm_gem_get_pages(gem_obj); in _get_pages() local
158 if (IS_ERR(pages)) in _get_pages()
159 return pages; in _get_pages()
161 if (cmpxchg(&vkms_obj->pages, NULL, pages)) in _get_pages()
162 drm_gem_put_pages(gem_obj, pages, false, true); in _get_pages()
165 return vkms_obj->pages; in _get_pages()
175 WARN_ON(vkms_obj->pages); in vkms_gem_vunmap()
185 drm_gem_put_pages(obj, vkms_obj->pages, false, true); in vkms_gem_vunmap()
186 vkms_obj->pages = NULL; in vkms_gem_vunmap()
201 struct page **pages = _get_pages(vkms_obj); in vkms_gem_vmap() local
203 if (IS_ERR(pages)) { in vkms_gem_vmap()
204 ret = PTR_ERR(pages); in vkms_gem_vmap()
208 vkms_obj->vaddr = vmap(pages, n_pages, VM_MAP, PAGE_KERNEL); in vkms_gem_vmap()
218 drm_gem_put_pages(obj, vkms_obj->pages, false, true); in vkms_gem_vmap()
219 vkms_obj->pages = NULL; in vkms_gem_vmap()
238 DRM_DEBUG_PRIME("Importing %d pages\n", npages); in vkms_prime_import_sg_table()
240 obj->pages = kvmalloc_array(npages, sizeof(struct page *), GFP_KERNEL); in vkms_prime_import_sg_table()
241 if (!obj->pages) { in vkms_prime_import_sg_table()
246 drm_prime_sg_to_page_addr_arrays(sg, obj->pages, NULL, npages); in vkms_prime_import_sg_table()