From: oga Date: Thu, 21 Aug 2008 21:43:56 +0000 (+0000) Subject: Rip out the remnants of the vblank signal stuff. Nothing uses it, and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6dfffb5a36fbe89a8e7b1740e5c90081c945f11d;p=openbsd Rip out the remnants of the vblank signal stuff. Nothing uses it, and it's stupid anyway. Most of this was ifdefed out. --- diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index cbdbb6760a5..bc8f3834516 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -482,9 +482,6 @@ typedef struct drm_local_map { } drm_local_map_t; struct drm_vblank { -#if 0 /* unneeded for now, signal support */ - TAILQ_HEAD(vbl_sigs); -#endif u_int32_t last_vblank; /* Last vblank we recieved */ atomic_t vbl_count; /* Number of interrupts */ int vbl_queue; /* sleep on this when waiting */ @@ -493,14 +490,6 @@ struct drm_vblank { int vbl_inmodeset; /* is the DDX currently modesetting */ }; -TAILQ_HEAD(drm_vbl_sig_list, drm_vbl_sig); -typedef struct drm_vbl_sig { - TAILQ_ENTRY(drm_vbl_sig) link; - unsigned int sequence; - int signo; - int pid; -} drm_vbl_sig_t; - /* location of GART table */ #define DRM_ATI_GART_MAIN 1 #define DRM_ATI_GART_FB 2 @@ -653,7 +642,6 @@ struct drm_device { int num_crtcs; /* number of crtcs */ u_int32_t max_vblank_count; /* size of counter reg*/ DRM_SPINTYPE vbl_lock; /* VBLANK data lock */ - atomic_t vbl_signal_pending; /* No. pending sigs */ int vblank_disable_allowed; struct timeout vblank_disable_timer; /* timer for disable */ struct drm_vblank *vblank; /* One per ctrc */ @@ -750,7 +738,6 @@ irqreturn_t drm_irq_handler(DRM_IRQ_ARGS); void drm_driver_irq_preinstall(struct drm_device *); void drm_driver_irq_postinstall(struct drm_device *); void drm_driver_irq_uninstall(struct drm_device *); -void drm_vbl_send_signals(struct drm_device *, int); void drm_vblank_cleanup(struct drm_device *); int drm_vblank_init(struct drm_device *, int); u_int32_t drm_vblank_count(struct drm_device *, int); diff --git a/sys/dev/pci/drm/drm_irq.c b/sys/dev/pci/drm/drm_irq.c index 32d1abc9206..0f6c99065cf 100644 --- a/sys/dev/pci/drm/drm_irq.c +++ b/sys/dev/pci/drm/drm_irq.c @@ -220,7 +220,6 @@ drm_vblank_init(struct drm_device *dev, int num_crtcs) { timeout_set(&dev->vblank_disable_timer, vblank_disable, dev); mtx_init(&dev->vbl_lock, IPL_BIO); - atomic_set(&dev->vbl_signal_pending, 0); dev->num_crtcs = num_crtcs; dev->vblank = drm_calloc(num_crtcs, sizeof(*dev->vblank), M_DRM); @@ -374,24 +373,6 @@ drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv) } if (flags & _DRM_VBLANK_SIGNAL) { -#if 0 /* disabled */ - drm_vbl_sig_t *vbl_sig = drm_calloc(1, sizeof(drm_vbl_sig_t), - DRM_MEM_DRIVER); - if (vbl_sig == NULL) - return ENOMEM; - - vbl_sig->sequence = vblwait->request.sequence; - vbl_sig->signo = vblwait->request.signal; - vbl_sig->pid = DRM_CURRENTPID; - - vblwait->reply.sequence = atomic_read(&dev->vbl_received); - - - DRM_SPINLOCK(&dev->vbl_lock); - TAILQ_INSERT_HEAD(&dev->vbl_sig_list, vbl_sig, link); - DRM_SPINUNLOCK(&dev->vbl_lock); - ret = 0; -#endif ret = EINVAL; } else { while (ret == 0) { @@ -421,42 +402,11 @@ drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv) return (ret); } -void -drm_vbl_send_signals(struct drm_device *dev, int crtc) -{ -} - -#if 0 /* disabled */ -void -drm_vbl_send_signals(struct drm_device *dev, int crtc) -{ - drm_vbl_sig_t *vbl_sig; - unsigned int vbl_seq = atomic_read(&dev->vbl_received); - struct proc *p; - - vbl_sig = TAILQ_FIRST(&dev->vbl_sig_list); - while (vbl_sig != NULL) { - drm_vbl_sig_t *next = TAILQ_NEXT(vbl_sig, link); - - if ((vbl_seq - vbl_sig->sequence) <= (1<<23)) { - p = pfind(vbl_sig->pid); - if (p != NULL) - psignal(p, vbl_sig->signo); - - TAILQ_REMOVE(&dev->vbl_sig_list, vbl_sig, link); - drm_free(vbl_sig, sizeof(*vbl_sig), DRM_MEM_DRIVER); - } - vbl_sig = next; - } -} -#endif - void drm_handle_vblank(struct drm_device *dev, int crtc) { atomic_inc(&dev->vblank[crtc].vbl_count); DRM_WAKEUP(&dev->vblank[crtc].vbl_queue); - drm_vbl_send_signals(dev, crtc); } void