summaryrefslogtreecommitdiff
path: root/linux-core/drm_dma.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-17 13:10:05 +0000
committerDave Airlie <airlied@linux.ie>2004-08-17 13:10:05 +0000
commit5c9ed8309493acb099463d25b32fabb5b7c004af (patch)
treeeec5be6f9374b5a2f61d52bd02ba0a44ba7e636d /linux-core/drm_dma.c
parent93e8c201afac565942f9d3523ac808d3220d6d0e (diff)
Merged drmfntbl-0-0-1
Diffstat (limited to 'linux-core/drm_dma.c')
-rw-r--r--linux-core/drm_dma.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/linux-core/drm_dma.c b/linux-core/drm_dma.c
index 04467342..811d768d 100644
--- a/linux-core/drm_dma.c
+++ b/linux-core/drm_dma.c
@@ -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