diff options
author | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2006-10-15 00:12:13 +0200 |
---|---|---|
committer | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2006-10-15 00:12:13 +0200 |
commit | 93fee5cf222ad6d97e0dcb85e13a8d8b84dba81f (patch) | |
tree | 4e62581041c93f6ab51e6cafd804e81b5172040f /linux-core/drm_bufs.c | |
parent | 2c5b91aecf3d21684ffca758c034cd9a8ed2155d (diff) | |
parent | a9f57a2b9c5897cbf568bf75342204b780566de0 (diff) |
Merge branch 'master' of git://anongit.freedesktop.org/git/mesa/drm into nouveau-1
Diffstat (limited to 'linux-core/drm_bufs.c')
-rw-r--r-- | linux-core/drm_bufs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index abd7c829..a2a3dbf7 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -942,6 +942,9 @@ int drm_addbufs_pci(drm_device_t * dev, drm_buf_desc_t * request) request->count = entry->buf_count; request->size = size; + if (request->flags & _DRM_PCI_BUFFER_RO) + dma->flags = _DRM_DMA_USE_PCI_RO; + atomic_dec(&dev->buf_alloc); return 0; @@ -1528,9 +1531,10 @@ int drm_freebufs(struct inode *inode, struct file *filp, * \param arg pointer to a drm_buf_map structure. * \return zero on success or a negative number on failure. * - * Maps the AGP or SG buffer region with do_mmap(), and copies information - * about each buffer into user space. The PCI buffers are already mapped on the - * addbufs_pci() call. + * Maps the AGP, SG or PCI buffer region with do_mmap(), and copies information + * about each buffer into user space. For PCI buffers, it calls do_mmap() with + * offset equal to 0, which drm_mmap() interpretes as PCI buffers and calls + * drm_mmap_dma(). */ int drm_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) |