From 5c9ed8309493acb099463d25b32fabb5b7c004af Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 17 Aug 2004 13:10:05 +0000 Subject: Merged drmfntbl-0-0-1 --- linux/drm_dma.h | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'linux/drm_dma.h') diff --git a/linux/drm_dma.h b/linux/drm_dma.h index 04467342..811d768d 100644 --- a/linux/drm_dma.h +++ b/linux/drm_dma.h @@ -117,9 +117,9 @@ 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 + + if (dev->fn_tbl.freelist_destroy) + dev->fn_tbl.freelist_destroy(&dma->bufs[i].freelist); } } @@ -159,16 +159,13 @@ 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 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. */ + else if (dev->fn_tbl.freelist_put) + dev->fn_tbl.freelist_put(dev, &dev->dma->bufs[buf->order].freelist, buf); + } #if !__HAVE_DMA_RECLAIM -- cgit v1.2.3