summaryrefslogtreecommitdiff
path: root/bsd
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2002-09-29 21:19:01 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2002-09-29 21:19:01 +0000
commit9243e642dabc30ddf4b1743acb8cd4e9e905f351 (patch)
tree8c7e02e3c4ffc88da3716ddf440844a586d92fa6 /bsd
parente6901cad696cf58ee9f1a48bdc7e9fa047824f8a (diff)
Move os-dependent stuff out of radeon_irq.c
Diffstat (limited to 'bsd')
-rw-r--r--bsd/drm_dma.h1
-rw-r--r--bsd/drm_os_freebsd.h17
2 files changed, 15 insertions, 3 deletions
diff --git a/bsd/drm_dma.h b/bsd/drm_dma.h
index 25d7eb6e..4593a712 100644
--- a/bsd/drm_dma.h
+++ b/bsd/drm_dma.h
@@ -597,7 +597,6 @@ int DRM(control)( DRM_IOCTL_ARGS )
}
#if __HAVE_VBL_IRQ
-
int DRM(wait_vblank)( DRM_IOCTL_ARGS )
{
DRM_DEVICE;
diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h
index 70ca60a6..a0ec9e3c 100644
--- a/bsd/drm_os_freebsd.h
+++ b/bsd/drm_os_freebsd.h
@@ -139,6 +139,21 @@ do { \
} \
} while (0)
+#define DRM_HZ hz
+
+#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
+do { \
+ if (condition) \
+ break; \
+ ret = tsleep( &(queue), PZERO | PCATCH, "rdnirq", (timeout) ); \
+ if ( (ret == EWOULDBLOCK) || (ret == EINTR) ) \
+ return DRM_ERR(EBUSY); \
+} while (1)
+
+#define DRM_WAKEUP( queue ) wakeup( queue )
+#define DRM_WAKEUP_INT( queue ) wakeup( queue )
+#define DRM_INIT_WAITQUEUE( queue ) do {} while (0)
+
#define DRM_COPY_TO_USER_IOCTL(user, kern, size) \
if ( IOCPARM_LEN(cmd) != size) \
return EINVAL; \
@@ -173,8 +188,6 @@ do { \
__asm __volatile("" : : : "memory"); \
} while (0)
-#define DRM_WAKEUP(w) wakeup(w)
-#define DRM_WAKEUP_INT(w) wakeup(w)
#define PAGE_ALIGN(addr) round_page(addr)