Lines Matching defs:map

68 static pgprot_t drm_io_prot(struct drm_local_map *map,
78 if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING))
111 * Find the right map and if it's AGP memory find the real physical page to
112 * map, get the page, increment the use count and return it.
120 struct drm_local_map *map = NULL;
125 * Find the right map
137 map = r_list->map;
139 if (map && map->type == _DRM_AGP) {
145 resource_size_t baddr = map->offset + offset;
157 * It's AGP memory - find the real physical page to map
201 * Get the mapping, find the real physical page to map, get the page, and
207 struct drm_local_map *map = vma->vm_private_data;
212 if (!map)
216 i = (unsigned long)map->handle + offset;
232 * Deletes map information if we are the last
240 struct drm_local_map *map;
247 map = vma->vm_private_data;
251 if (pt->vma->vm_private_data == map)
259 /* We were the only map that was found */
260 if (found_maps == 1 && map->flags & _DRM_REMOVABLE) {
266 if (r_list->map == map)
271 switch (map->type) {
274 arch_phys_wc_del(map->mtrr);
275 iounmap(map->handle);
278 vfree(map->handle);
285 map->size,
286 map->handle,
287 map->offset);
290 kfree(map);
337 * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
342 struct drm_local_map *map = vma->vm_private_data;
357 map_offset = map->offset - (unsigned long)dev->sg->virtual;
523 * area, so calls mmap_dma(). Otherwise searches the map in drm_device::maplist,
532 struct drm_local_map *map = NULL;
555 DRM_ERROR("Could not find map\n");
559 map = drm_hash_entry(hash, struct drm_map_list, hash)->map;
560 if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
564 if (map->size < vma->vm_end - vma->vm_start)
567 if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
582 switch (map->type) {
602 vma->vm_page_prot = drm_io_prot(map, vma);
604 (map->offset + offset) >> PAGE_SHIFT,
610 map->type,
611 vma->vm_start, vma->vm_end, (unsigned long long)(map->offset + offset));
619 page_to_pfn(virt_to_page(map->handle)),
622 vma->vm_page_prot = drm_dma_prot(map->type, vma);
626 vma->vm_private_data = (void *)map;
630 vma->vm_private_data = (void *)map;
631 vma->vm_page_prot = drm_dma_prot(map->type, vma);