diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-03-20 04:53:12 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-03-20 04:53:12 +0000 |
commit | 895053fb73e8437f2bb9c15258104e0cac32eacf (patch) | |
tree | 94f2549875a4e4b9bb4f7d12fe9f263e407d90b1 /sys/dev/drm/drm_irq.c | |
parent | 2a1f86a975dab252b876662ce50b67194c71a913 (diff) | |
download | FreeBSD-src-895053fb73e8437f2bb9c15258104e0cac32eacf.zip FreeBSD-src-895053fb73e8437f2bb9c15258104e0cac32eacf.tar.gz |
Only issue the wakeup and store the counter if vblank is enabled on
the pipe.
MFC after: 3 days
Diffstat (limited to 'sys/dev/drm/drm_irq.c')
-rw-r--r-- | sys/dev/drm/drm_irq.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/drm/drm_irq.c b/sys/dev/drm/drm_irq.c index 6ece9eb..da3ccfb 100644 --- a/sys/dev/drm/drm_irq.c +++ b/sys/dev/drm/drm_irq.c @@ -210,10 +210,12 @@ int drm_irq_uninstall(struct drm_device *dev) */ DRM_SPINLOCK(&dev->vbl_lock); for (crtc = 0; crtc < dev->num_crtcs; crtc++) { - DRM_WAKEUP(&dev->vblank[crtc].queue); - dev->vblank[crtc].enabled = 0; - dev->vblank[crtc].last = - dev->driver->get_vblank_counter(dev, crtc); + if (dev->vblank[crtc].enabled) { + DRM_WAKEUP(&dev->vblank[crtc].queue); + dev->vblank[crtc].enabled = 0; + dev->vblank[crtc].last = + dev->driver->get_vblank_counter(dev, crtc); + } } DRM_SPINUNLOCK(&dev->vbl_lock); |