summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-05-12 19:42:43 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-05-12 19:42:43 +0000
commitaa339e85ad498931052e2565d3c7d6455ee4a2f9 (patch)
treeb59cffffacffe83b8acf77456de3276c91f37a62 /sys/dev/pci
parent0e2ab66a33ce545faf7af7e881caef6087b71886 (diff)
Remove the vblank_disable_allowed crud.
it's a linux compat hack for older X drivers that don't use the right calls. All the drivers capable of turning vblanks off already use the calls correctly, and this way we avoid problems with not being able to turn off vblanks until we switch mode (so until then we're stuck at $REFRESH_RATE interrupts a second from the graphics card, no thanks).
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/drmP.h1
-rw-r--r--sys/dev/pci/drm/drm_irq.c7
2 files changed, 0 insertions, 8 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index 9cc5e9017df..9ad87614deb 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -298,7 +298,6 @@ struct drm_local_map {
struct drm_vblank_info {
struct mutex vb_lock; /* VBLANK data lock */
struct timeout vb_disable_timer; /* timer for disable */
- int vb_disable_allowed;
int vb_num; /* number of crtcs */
u_int32_t vb_max; /* counter reg size */
struct drm_vblank {
diff --git a/sys/dev/pci/drm/drm_irq.c b/sys/dev/pci/drm/drm_irq.c
index 85b07039874..7ba4bf0da4d 100644
--- a/sys/dev/pci/drm/drm_irq.c
+++ b/sys/dev/pci/drm/drm_irq.c
@@ -159,9 +159,6 @@ vblank_disable(void *arg)
int i;
mtx_enter(&vbl->vb_lock);
- if (!vbl->vb_disable_allowed)
- goto out;
-
for (i = 0; i < vbl->vb_num; i++) {
crtc = &vbl->vb_crtcs[i];
@@ -173,7 +170,6 @@ vblank_disable(void *arg)
crtc->vbl_enabled = 0;
}
}
-out:
mtx_leave(&vbl->vb_lock);
}
@@ -307,9 +303,6 @@ drm_modeset_ctl(struct drm_device *dev, void *data, struct drm_file *file_priv)
case _DRM_POST_MODESET:
DPRINTF("%s: post modeset on %d\n", __func__, crtc);
if (vbl->vbl_inmodeset) {
- mtx_enter(&dev->vblank->vb_lock);
- dev->vblank->vb_disable_allowed = 1;
- mtx_leave(&dev->vblank->vb_lock);
if (vbl->vbl_inmodeset & 0x2)
drm_vblank_put(dev, crtc);
vbl->vbl_inmodeset = 0;