Remove the vbl signal code because it's untested (and has lock issues on
authorEric Anholt <anholt@freebsd.org>
Thu, 6 Mar 2003 19:21:23 +0000 (19:21 +0000)
committerEric Anholt <anholt@freebsd.org>
Thu, 6 Mar 2003 19:21:23 +0000 (19:21 +0000)
    -current).

bsd-core/drmP.h
bsd-core/drm_dma.c
bsd/drmP.h
bsd/drm_dma.h

index a4308f3..75b8fb9 100644 (file)
@@ -27,6 +27,7 @@
  * Authors:
  *    Rickard E. (Rik) Faith <faith@valinux.com>
  *    Gareth Hughes <gareth@valinux.com>
+ * $FreeBSD: src/sys/dev/drm/drmP.h,v 1.2 2002/04/29 18:18:42 anholt Exp $
  */
 
 #ifndef _DRM_P_H_
@@ -489,9 +490,11 @@ struct drm_device {
 #if __HAVE_VBL_IRQ
        wait_queue_head_t vbl_queue;    /* vbl wait channel */
        atomic_t          vbl_received;
+#if 0 /* vbl signals are untested, ntested */
        struct drm_vbl_sig_list vbl_sig_list;
        DRM_SPINTYPE      vbl_lock;
 #endif
+#endif
        cycles_t          ctx_start;
        cycles_t          lck_start;
 #if __HAVE_DMA_HISTOGRAM
index 7c1e97f..231b329 100644 (file)
@@ -524,7 +524,7 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
        TASK_INIT(&dev->task, 0, DRM(dma_immediate_bh), dev);
 #endif
 
-#if __HAVE_VBL_IRQ
+#if __HAVE_VBL_IRQ && 0 /* disabled */
        DRM_SPININIT( dev->vbl_lock, "vblsig" );
        TAILQ_INIT( &dev->vbl_sig_list );
 #endif
@@ -645,6 +645,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
 
        flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;
        if (flags & _DRM_VBLANK_SIGNAL) {
+#if 0 /* disabled */
                drm_vbl_sig_t *vbl_sig = DRM_MALLOC(sizeof(drm_vbl_sig_t));
                if (vbl_sig == NULL)
                        return ENOMEM;
@@ -660,6 +661,8 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
                TAILQ_INSERT_HEAD(&dev->vbl_sig_list, vbl_sig, link);
                DRM_SPINUNLOCK(&dev->vbl_lock);
                ret = 0;
+#endif
+               ret = EINVAL;
        } else {
                ret = DRM(vblank_wait)(dev, &vblwait.request.sequence);
                
@@ -674,6 +677,11 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
        return ret;
 }
 
+void DRM(vbl_send_signals)(drm_device_t *dev)
+{
+}
+
+#if 0 /* disabled */
 void DRM(vbl_send_signals)( drm_device_t *dev )
 {
        drm_vbl_sig_t *vbl_sig;
@@ -699,6 +707,7 @@ void DRM(vbl_send_signals)( drm_device_t *dev )
 
        DRM_SPINUNLOCK(&dev->vbl_lock);
 }
+#endif
 
 #endif /*  __HAVE_VBL_IRQ */
 
index a4308f3..75b8fb9 100644 (file)
@@ -27,6 +27,7 @@
  * Authors:
  *    Rickard E. (Rik) Faith <faith@valinux.com>
  *    Gareth Hughes <gareth@valinux.com>
+ * $FreeBSD: src/sys/dev/drm/drmP.h,v 1.2 2002/04/29 18:18:42 anholt Exp $
  */
 
 #ifndef _DRM_P_H_
@@ -489,9 +490,11 @@ struct drm_device {
 #if __HAVE_VBL_IRQ
        wait_queue_head_t vbl_queue;    /* vbl wait channel */
        atomic_t          vbl_received;
+#if 0 /* vbl signals are untested, ntested */
        struct drm_vbl_sig_list vbl_sig_list;
        DRM_SPINTYPE      vbl_lock;
 #endif
+#endif
        cycles_t          ctx_start;
        cycles_t          lck_start;
 #if __HAVE_DMA_HISTOGRAM
index 7c1e97f..231b329 100644 (file)
@@ -524,7 +524,7 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
        TASK_INIT(&dev->task, 0, DRM(dma_immediate_bh), dev);
 #endif
 
-#if __HAVE_VBL_IRQ
+#if __HAVE_VBL_IRQ && 0 /* disabled */
        DRM_SPININIT( dev->vbl_lock, "vblsig" );
        TAILQ_INIT( &dev->vbl_sig_list );
 #endif
@@ -645,6 +645,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
 
        flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;
        if (flags & _DRM_VBLANK_SIGNAL) {
+#if 0 /* disabled */
                drm_vbl_sig_t *vbl_sig = DRM_MALLOC(sizeof(drm_vbl_sig_t));
                if (vbl_sig == NULL)
                        return ENOMEM;
@@ -660,6 +661,8 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
                TAILQ_INSERT_HEAD(&dev->vbl_sig_list, vbl_sig, link);
                DRM_SPINUNLOCK(&dev->vbl_lock);
                ret = 0;
+#endif
+               ret = EINVAL;
        } else {
                ret = DRM(vblank_wait)(dev, &vblwait.request.sequence);
                
@@ -674,6 +677,11 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
        return ret;
 }
 
+void DRM(vbl_send_signals)(drm_device_t *dev)
+{
+}
+
+#if 0 /* disabled */
 void DRM(vbl_send_signals)( drm_device_t *dev )
 {
        drm_vbl_sig_t *vbl_sig;
@@ -699,6 +707,7 @@ void DRM(vbl_send_signals)( drm_device_t *dev )
 
        DRM_SPINUNLOCK(&dev->vbl_lock);
 }
+#endif
 
 #endif /*  __HAVE_VBL_IRQ */