From 9243e642dabc30ddf4b1743acb8cd4e9e905f351 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sun, 29 Sep 2002 21:19:01 +0000 Subject: Move os-dependent stuff out of radeon_irq.c --- bsd-core/drm_dma.c | 1 - bsd-core/drm_os_freebsd.h | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'bsd-core') diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c index 25d7eb6e..4593a712 100644 --- a/bsd-core/drm_dma.c +++ b/bsd-core/drm_dma.c @@ -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-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h index 70ca60a6..a0ec9e3c 100644 --- a/bsd-core/drm_os_freebsd.h +++ b/bsd-core/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) -- cgit v1.2.3