summaryrefslogtreecommitdiff
path: root/bsd-core/drm_drv.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-10-17 05:13:48 +0000
committerEric Anholt <anholt@freebsd.org>2003-10-17 05:13:48 +0000
commit2950f9e6823d43abae151966ae808d1a63e6659c (patch)
treeb7fbcbc101da31d02c5f3748568bc9caf54b13fa /bsd-core/drm_drv.c
parentff58476011ba8fe72d65e884380d3d86710bfdd4 (diff)
- Move IRQ functions from drm_dma.h to new drm_irq.h and disentangle them
from __HAVE_DMA. This will be useful for adding vblank sync support to sis and tdfx. Rename dma_service to irq_handler, which is more accurately what it is. - Fix the #if _HAVE_DMA_IRQ in radeon, r128, mga, i810, i830, gamma to have the right number of underscores. This may have been a problem in the case that the server died without doing its DRM_IOCTL_CONTROL to uninit.
Diffstat (limited to 'bsd-core/drm_drv.c')
-rw-r--r--bsd-core/drm_drv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index bfded6bb..8a9e3036 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -55,8 +55,8 @@
#ifndef __HAVE_CTX_BITMAP
#define __HAVE_CTX_BITMAP 0
#endif
-#ifndef __HAVE_DMA_IRQ
-#define __HAVE_DMA_IRQ 0
+#ifndef __HAVE_IRQ
+#define __HAVE_IRQ 0
#endif
#ifndef __HAVE_DMA_QUEUE
#define __HAVE_DMA_QUEUE 0
@@ -170,9 +170,9 @@ static drm_ioctl_desc_t DRM(ioctls)[] = {
[DRM_IOCTL_NR(DRM_IOCTL_INFO_BUFS)] = { DRM(infobufs), 1, 0 },
[DRM_IOCTL_NR(DRM_IOCTL_MAP_BUFS)] = { DRM(mapbufs), 1, 0 },
[DRM_IOCTL_NR(DRM_IOCTL_FREE_BUFS)] = { DRM(freebufs), 1, 0 },
-
- /* The DRM_IOCTL_DMA ioctl should be defined by the driver.
- */
+ /* The DRM_IOCTL_DMA ioctl should be defined by the driver. */
+#endif
+#if __HAVE_IRQ || __HAVE_DMA
[DRM_IOCTL_NR(DRM_IOCTL_CONTROL)] = { DRM(control), 1, 1 },
#endif
@@ -510,7 +510,7 @@ static int DRM(takedown)( drm_device_t *dev )
DRM_DEBUG( "\n" );
DRIVER_PRETAKEDOWN();
-#if __HAVE_DMA_IRQ
+#if __HAVE_IRQ
if (dev->irq != 0)
DRM(irq_uninstall)( dev );
#endif