Lines Matching defs:map

66 static pgprot_t drm_io_prot(struct drm_local_map *map,
73 if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING))
106 * Find the right map and if it's AGP memory find the real physical page to
107 * map, get the page, increment the use count and return it.
115 struct drm_local_map *map = NULL;
120 * Find the right map
132 map = r_list->map;
134 if (map && map->type == _DRM_AGP) {
140 resource_size_t baddr = map->offset + offset;
152 * It's AGP memory - find the real physical page to map
196 * Get the mapping, find the real physical page to map, get the page, and
202 struct drm_local_map *map = vma->vm_private_data;
207 if (!map)
211 i = (unsigned long)map->handle + offset;
227 * Deletes map information if we are the last
235 struct drm_local_map *map;
242 map = vma->vm_private_data;
246 if (pt->vma->vm_private_data == map)
254 /* We were the only map that was found */
255 if (found_maps == 1 && map->flags & _DRM_REMOVABLE) {
261 if (r_list->map == map)
266 switch (map->type) {
269 arch_phys_wc_del(map->mtrr);
270 iounmap(map->handle);
273 vfree(map->handle);
280 map->size,
281 map->handle,
282 map->offset);
285 kfree(map);
332 * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
337 struct drm_local_map *map = vma->vm_private_data;
352 map_offset = map->offset - (unsigned long)dev->sg->virtual;
518 * area, so calls mmap_dma(). Otherwise searches the map in drm_device::maplist,
527 struct drm_local_map *map = NULL;
550 DRM_ERROR("Could not find map\n");
554 map = drm_hash_entry(hash, struct drm_map_list, hash)->map;
555 if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
559 if (map->size < vma->vm_end - vma->vm_start)
562 if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
577 switch (map->type) {
597 vma->vm_page_prot = drm_io_prot(map, vma);
599 (map->offset + offset) >> PAGE_SHIFT,
605 map->type,
606 vma->vm_start, vma->vm_end, (unsigned long long)(map->offset + offset));
614 page_to_pfn(virt_to_page(map->handle)),
617 vma->vm_page_prot = drm_dma_prot(map->type, vma);
621 vma->vm_private_data = (void *)map;
625 vma->vm_private_data = (void *)map;
626 vma->vm_page_prot = drm_dma_prot(map->type, vma);