summaryrefslogtreecommitdiff
path: root/linux-core/drm_bufs.c
diff options
context:
space:
mode:
authorGareth Hughes <gareth@users.sourceforge.net>2001-02-16 05:24:06 +0000
committerGareth Hughes <gareth@users.sourceforge.net>2001-02-16 05:24:06 +0000
commit01a14789edce0ce1cae0f3fd4328833399fae56d (patch)
tree455e6c689273e86516654df7b62e97a3131256d5 /linux-core/drm_bufs.c
parent1d30ac11404c588e4a158d72f987c1fb3e478bea (diff)
- Clean up the way customization of the templates is done.ati-5-0-1-20010220-head
- Fix old-style DMA for gamma driver (please test). - Pull out IRQ handling into drm_dma.h (please test on i810, gamma). - Lots of general cleanups, remove compiler warnings etc.
Diffstat (limited to 'linux-core/drm_bufs.c')
-rw-r--r--linux-core/drm_bufs.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index f2613a985..38ea1ff05 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -252,7 +252,7 @@ int DRM(addbufs_agp)( struct inode *inode, struct file *filp,
buf->order = order;
buf->used = 0;
- buf->offset = (dma->byte_count + offset); /* ******** */
+ buf->offset = (dma->byte_count + offset);
buf->bus_address = agp_offset + offset;
buf->address = (void *)(agp_offset + offset);
buf->next = NULL;
@@ -266,7 +266,7 @@ int DRM(addbufs_agp)( struct inode *inode, struct file *filp,
DRM_MEM_BUFS );
memset( buf->dev_private, 0, buf->dev_priv_size );
-#if DRM_DMA_HISTOGRAM
+#if __HAVE_DMA_HISTOGRAM
buf->time_queued = 0;
buf->time_dispatched = 0;
buf->time_completed = 0;
@@ -297,17 +297,12 @@ int DRM(addbufs_agp)( struct inode *inode, struct file *filp,
DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
-/* GH: Please leave this disabled for now. I need to fix this properly...
- */
-#if 0
- /* FIXME: work this mess out...
- */
+#if __HAVE_DMA_FREELIST
DRM(freelist_create)( &entry->freelist, entry->buf_count );
for ( i = 0 ; i < entry->buf_count ; i++ ) {
DRM(freelist_put)( dev, &entry->freelist, &entry->buflist[i] );
}
#endif
-
up( &dev->struct_sem );
request.count = entry->buf_count;
@@ -443,11 +438,11 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp,
buf->pending = 0;
init_waitqueue_head( &buf->dma_wait );
buf->pid = 0;
-#if DRM_DMA_HISTOGRAM
+#if __HAVE_DMA_HISTOGRAM
buf->time_queued = 0;
buf->time_dispatched = 0;
buf->time_completed = 0;
- buf->time_freed = 0;
+ buf->time_freed = 0;
#endif
DRM_DEBUG( "buffer %d @ %p\n",
entry->buf_count, buf->address );
@@ -469,17 +464,12 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp,
dma->page_count += entry->seg_count << page_order;
dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order);
-/* GH: Please leave this disabled for now. I need to fix this properly...
- */
-#if 0
- /* FIXME: work this mess out...
- */
+#if __HAVE_DMA_FREELIST
DRM(freelist_create)( &entry->freelist, entry->buf_count );
for ( i = 0 ; i < entry->buf_count ; i++ ) {
DRM(freelist_put)( dev, &entry->freelist, &entry->buflist[i] );
}
#endif
-
up( &dev->struct_sem );
request.count = entry->buf_count;