summaryrefslogtreecommitdiff
path: root/bsd
diff options
context:
space:
mode:
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)