From d38043a0399a77879726d1c270cefc922855b914 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 4 Sep 2004 15:37:35 +1000 Subject: [PATCH] Dump __HAVE_DMA_FREELIST is only used by gamma. Signed-off-by: Dave Airlie --- drivers/char/drm/drmP.h | 3 --- drivers/char/drm/drm_bufs.h | 22 ---------------------- drivers/char/drm/drm_dma.h | 13 ------------- drivers/char/drm/gamma.h | 3 ++- 4 files changed, 2 insertions(+), 39 deletions(-) diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 7154be121bbee..77ad08216402a 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -98,9 +98,6 @@ #ifndef __HAVE_DMA_WAITLIST #define __HAVE_DMA_WAITLIST 0 #endif -#ifndef __HAVE_DMA_FREELIST -#define __HAVE_DMA_FREELIST 0 -#endif #define __REALLY_HAVE_AGP (__HAVE_AGP && (defined(CONFIG_AGP) || \ defined(CONFIG_AGP_MODULE))) diff --git a/drivers/char/drm/drm_bufs.h b/drivers/char/drm/drm_bufs.h index a74eb361894cb..2dcc9cb812bd7 100644 --- a/drivers/char/drm/drm_bufs.h +++ b/drivers/char/drm/drm_bufs.h @@ -336,10 +336,6 @@ static void DRM(cleanup_buf_error)(drm_buf_entry_t *entry) sizeof(*entry->buflist), DRM_MEM_BUFS); -#if __HAVE_DMA_FREELIST - DRM(freelist_destroy)(&entry->freelist); -#endif - entry->buf_count = 0; } } @@ -508,12 +504,6 @@ 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 ); -#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; @@ -747,12 +737,6 @@ 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); -#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; @@ -918,12 +902,6 @@ int DRM(addbufs_sg)( 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 ); -#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; diff --git a/drivers/char/drm/drm_dma.h b/drivers/char/drm/drm_dma.h index 72122754d97c2..14929c23ebcea 100644 --- a/drivers/char/drm/drm_dma.h +++ b/drivers/char/drm/drm_dma.h @@ -116,9 +116,6 @@ void DRM(dma_takedown)(drm_device_t *dev) dma->bufs[i].buf_count * sizeof(*dma->bufs[0].buflist), DRM_MEM_BUFS); -#if __HAVE_DMA_FREELIST - DRM(freelist_destroy)(&dma->bufs[i].freelist); -#endif } } @@ -158,16 +155,6 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf) if ( __HAVE_DMA_WAITQUEUE && waitqueue_active(&buf->dma_wait)) { wake_up_interruptible(&buf->dma_wait); } -#if __HAVE_DMA_FREELIST - else { - drm_device_dma_t *dma = dev->dma; - /* If processes are waiting, the last one - to wake will put the buffer on the free - list. If no processes are waiting, we - put the buffer on the freelist here. */ - DRM(freelist_put)(dev, &dma->bufs[buf->order].freelist, buf); - } -#endif } #if !__HAVE_DMA_RECLAIM diff --git a/drivers/char/drm/gamma.h b/drivers/char/drm/gamma.h index 830da46006e88..0cdc42a3dc8dd 100644 --- a/drivers/char/drm/gamma.h +++ b/drivers/char/drm/gamma.h @@ -81,7 +81,8 @@ #define __HAVE_DMA_WAITQUEUE 1 #define __HAVE_DMA_WAITLIST 1 -#define __HAVE_DMA_FREELIST 1 +/* removed from DRM HAVE_DMA_FREELIST */ +//#define __HAVE_DMA_FREELIST 1 #define __HAVE_DMA_SCHEDULE 1 -- 2.53.0