diff options
author | Dave Airlie <airlied@linux.ie> | 2004-08-17 13:10:05 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-08-17 13:10:05 +0000 |
commit | 5c9ed8309493acb099463d25b32fabb5b7c004af (patch) | |
tree | eec5be6f9374b5a2f61d52bd02ba0a44ba7e636d /linux/drm_dma.h | |
parent | 93e8c201afac565942f9d3523ac808d3220d6d0e (diff) |
Merged drmfntbl-0-0-1
Diffstat (limited to 'linux/drm_dma.h')
-rw-r--r-- | linux/drm_dma.h | 23 |
1 files changed, 10 insertions, 13 deletions
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 |