Lines Matching refs:buf_priv

63 		drm_i810_buf_priv_t *buf_priv = buf->dev_private;  in i810_freelist_get()  local
65 used = cmpxchg(buf_priv->in_use, I810_BUF_FREE, in i810_freelist_get()
79 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_freelist_put() local
83 used = cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, I810_BUF_FREE); in i810_freelist_put()
98 drm_i810_buf_priv_t *buf_priv; in i810_mmap_buffers() local
103 buf_priv = buf->dev_private; in i810_mmap_buffers()
107 buf_priv->currently_mapped = I810_BUF_MAPPED; in i810_mmap_buffers()
128 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_map_buffer() local
133 if (buf_priv->currently_mapped == I810_BUF_MAPPED) in i810_map_buffer()
140 buf_priv->virtual = (void *)vm_mmap(file_priv->filp, 0, buf->total, in i810_map_buffer()
145 if (IS_ERR(buf_priv->virtual)) { in i810_map_buffer()
148 retcode = PTR_ERR(buf_priv->virtual); in i810_map_buffer()
149 buf_priv->virtual = NULL; in i810_map_buffer()
157 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_unmap_buffer() local
160 if (buf_priv->currently_mapped != I810_BUF_MAPPED) in i810_unmap_buffer()
163 retcode = vm_munmap((unsigned long)buf_priv->virtual, in i810_unmap_buffer()
166 buf_priv->currently_mapped = I810_BUF_UNMAPPED; in i810_unmap_buffer()
167 buf_priv->virtual = NULL; in i810_unmap_buffer()
176 drm_i810_buf_priv_t *buf_priv; in i810_dma_get_buffer() local
193 buf_priv = buf->dev_private; in i810_dma_get_buffer()
197 d->virtual = buf_priv->virtual; in i810_dma_get_buffer()
230 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_dma_cleanup() local
232 if (buf_priv->kernel_virtual && buf->total) in i810_dma_cleanup()
233 drm_legacy_ioremapfree(&buf_priv->map, dev); in i810_dma_cleanup()
298 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_freelist_init() local
300 buf_priv->in_use = hw_status++; in i810_freelist_init()
301 buf_priv->my_use_idx = my_idx; in i810_freelist_init()
304 *buf_priv->in_use = I810_BUF_FREE; in i810_freelist_init()
306 buf_priv->map.offset = buf->bus_address; in i810_freelist_init()
307 buf_priv->map.size = buf->total; in i810_freelist_init()
308 buf_priv->map.type = _DRM_AGP; in i810_freelist_init()
309 buf_priv->map.flags = 0; in i810_freelist_init()
310 buf_priv->map.mtrr = 0; in i810_freelist_init()
312 drm_legacy_ioremap(&buf_priv->map, dev); in i810_freelist_init()
313 buf_priv->kernel_virtual = buf_priv->map.handle; in i810_freelist_init()
715 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_dma_dispatch_vertex() local
735 if (buf_priv->currently_mapped == I810_BUF_MAPPED) { in i810_dma_dispatch_vertex()
738 *(u32 *) buf_priv->kernel_virtual = in i810_dma_dispatch_vertex()
742 *(u32 *) ((char *) buf_priv->kernel_virtual + used) = 0; in i810_dma_dispatch_vertex()
775 (void)cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, in i810_dma_dispatch_vertex()
783 OUT_RING(buf_priv->my_use_idx); in i810_dma_dispatch_vertex()
872 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_flush_queue() local
874 int used = cmpxchg(buf_priv->in_use, I810_BUF_HARDWARE, in i810_flush_queue()
904 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_driver_reclaim_buffers() local
906 if (buf->file_priv == file_priv && buf_priv) { in i810_driver_reclaim_buffers()
907 int used = cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, in i810_driver_reclaim_buffers()
912 if (buf_priv->currently_mapped == I810_BUF_MAPPED) in i810_driver_reclaim_buffers()
913 buf_priv->currently_mapped = I810_BUF_UNMAPPED; in i810_driver_reclaim_buffers()
1036 drm_i810_buf_priv_t *buf_priv = buf->dev_private; in i810_dma_dispatch_mc() local
1045 u = cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, I810_BUF_HARDWARE); in i810_dma_dispatch_mc()
1062 if (buf_priv->currently_mapped == I810_BUF_MAPPED) { in i810_dma_dispatch_mc()
1064 *(u32 *) ((char *) buf_priv->virtual + used) = 0; in i810_dma_dispatch_mc()
1079 OUT_RING(buf_priv->my_use_idx); in i810_dma_dispatch_mc()