summaryrefslogtreecommitdiff
path: root/linux-core/drm_dma.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-24 11:15:53 +0000
committerDave Airlie <airlied@linux.ie>2004-08-24 11:15:53 +0000
commitd4dbf457813e97531ded3bf24f3b6ad421189c69 (patch)
tree8e47c1dd5d7cf9c8c4bce4a7e34531fc9a8eae75 /linux-core/drm_dma.c
parenteac498baeaf9b57b448065b0fb9f4eeadbb9aa6b (diff)
Merged drmfntbl-0-0-2
Diffstat (limited to 'linux-core/drm_dma.c')
-rw-r--r--linux-core/drm_dma.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/linux-core/drm_dma.c b/linux-core/drm_dma.c
index 811d768d..cf8d8931 100644
--- a/linux-core/drm_dma.c
+++ b/linux-core/drm_dma.c
@@ -37,15 +37,6 @@
#include "drmP.h"
-#ifndef __HAVE_DMA_WAITQUEUE
-#define __HAVE_DMA_WAITQUEUE 0
-#endif
-#ifndef __HAVE_DMA_RECLAIM
-#define __HAVE_DMA_RECLAIM 0
-#endif
-
-#if __HAVE_DMA
-
/**
* Initialize the DMA data.
*
@@ -156,7 +147,7 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf)
buf->filp = NULL;
buf->used = 0;
- if ( __HAVE_DMA_WAITQUEUE && waitqueue_active(&buf->dma_wait)) {
+ if ( (dev->driver_features & DRIVER_DMA_QUEUE) && waitqueue_active(&buf->dma_wait)) {
wake_up_interruptible(&buf->dma_wait);
}
/* If processes are waiting, the last one
@@ -168,7 +159,6 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf)
}
-#if !__HAVE_DMA_RECLAIM
/**
* Reclaim the buffers.
*
@@ -176,7 +166,7 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf)
*
* Frees each buffer associated with \p filp not already on the hardware.
*/
-void DRM(reclaim_buffers)( struct file *filp )
+void DRM(core_reclaim_buffers)( struct file *filp )
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
@@ -200,29 +190,4 @@ void DRM(reclaim_buffers)( struct file *filp )
}
}
}
-#endif
-
-#if !__HAVE_IRQ
-/* This stub DRM_IOCTL_CONTROL handler is for the drivers that used to require
- * IRQs for DMA but no longer do. It maintains compatibility with the X Servers
- * that try to use the control ioctl by simply returning success.
- */
-int DRM(control)( struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long arg )
-{
- drm_control_t ctl;
-
- if ( copy_from_user( &ctl, (drm_control_t __user *)arg, sizeof(ctl) ) )
- return -EFAULT;
-
- switch ( ctl.func ) {
- case DRM_INST_HANDLER:
- case DRM_UNINST_HANDLER:
- return 0;
- default:
- return -EINVAL;
- }
-}
-#endif
-#endif /* __HAVE_DMA */