Keep track of the hardware counter more aggressively
authorHasso Tepper <hasso@estpak.ee>
Thu, 25 Jun 2009 18:37:52 +0000 (21:37 +0300)
committerHasso Tepper <hasso@estpak.ee>
Thu, 25 Jun 2009 21:28:12 +0000 (00:28 +0300)
... while interrupts are enabled.  This should help to reduce cases
where the hardware counter reference jumps by large amounts.

Obtained-from: FreeBSD

sys/dev/drm/drm_irq.c

index f4029bf..5346158 100644 (file)
@@ -306,6 +306,10 @@ int drm_vblank_get(struct drm_device *dev, int crtc)
                }
        }
 
+       if (dev->vblank[crtc].enabled)
+               dev->vblank[crtc].last =
+                   dev->driver->get_vblank_counter(dev, crtc);
+
        return ret;
 }