Lines Matching +full:com +full:- +full:offset

5  * \author Rickard E. (Rik) Faith <faith@valinux.com>
6 * \author Gareth Hughes <gareth@valinux.com>
10 * Created: Mon Jan 4 08:58:31 1999 by faith@valinux.com
46 drm_mmap(struct cdev *kdev, vm_ooffset_t offset, vm_paddr_t *paddr, in drm_mmap() argument
66 if (file_priv && !file_priv->authenticated) in drm_mmap()
69 DRM_DEBUG("called with offset %016jx\n", offset); in drm_mmap()
70 if (dev->dma && offset < ptoa(dev->dma->page_count)) { in drm_mmap()
71 drm_device_dma_t *dma = dev->dma; in drm_mmap()
73 DRM_SPINLOCK(&dev->dma_lock); in drm_mmap()
75 if (dma->pagelist != NULL) { in drm_mmap()
76 unsigned long page = offset >> PAGE_SHIFT; in drm_mmap()
77 unsigned long phys = dma->pagelist[page]; in drm_mmap()
79 DRM_SPINUNLOCK(&dev->dma_lock); in drm_mmap()
83 DRM_SPINUNLOCK(&dev->dma_lock); in drm_mmap()
84 return -1; in drm_mmap()
90 about 5-10 entries in the list and, 2) a in drm_mmap()
97 TAILQ_FOREACH(map, &dev->maplist, link) { in drm_mmap()
98 if (offset >> DRM_MAP_HANDLE_SHIFT == in drm_mmap()
99 (unsigned long)map->handle >> DRM_MAP_HANDLE_SHIFT) in drm_mmap()
104 DRM_DEBUG("Can't find map, request offset = %016jx\n", offset); in drm_mmap()
105 TAILQ_FOREACH(map, &dev->maplist, link) { in drm_mmap()
106 DRM_DEBUG("map offset = %016lx, handle = %016lx\n", in drm_mmap()
107 map->offset, (unsigned long)map->handle); in drm_mmap()
110 return -1; in drm_mmap()
112 if (((map->flags & _DRM_RESTRICTED) && !DRM_SUSER(DRM_CURPROC))) { in drm_mmap()
115 return -1; in drm_mmap()
117 type = map->type; in drm_mmap()
120 offset = offset & ((1ULL << DRM_MAP_HANDLE_SHIFT) - 1); in drm_mmap()
128 phys = map->offset + offset; in drm_mmap()
135 phys = vtophys((char *)map->virtual + offset); in drm_mmap()
139 return -1; /* This should never happen. */ in drm_mmap()