svn commit: r190125 - head/sys/dev/drm

Robert Noland rnoland at FreeBSD.org
Thu Mar 19 21:53:13 PDT 2009


Author: rnoland
Date: Fri Mar 20 04:53:12 2009
New Revision: 190125
URL: http://svn.freebsd.org/changeset/base/190125

Log:
  Only issue the wakeup and store the counter if vblank is enabled on
  the pipe.
  
  MFC after:	3 days

Modified:
  head/sys/dev/drm/drm_irq.c

Modified: head/sys/dev/drm/drm_irq.c
==============================================================================
--- head/sys/dev/drm/drm_irq.c	Fri Mar 20 04:49:48 2009	(r190124)
+++ head/sys/dev/drm/drm_irq.c	Fri Mar 20 04:53:12 2009	(r190125)
@@ -210,10 +210,12 @@ int drm_irq_uninstall(struct drm_device 
 	*/
 	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);
 


More information about the svn-src-all mailing list