diff options
author | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-05 10:37:02 +1000 |
---|---|---|
committer | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-05 10:37:02 +1000 |
commit | 43891ff2d0176f013796b3c2a340b7d379d703ee (patch) | |
tree | 734cdcd6e6c36997f1db92d41b92e4557ebf13b1 /shared-core/i915_irq.c | |
parent | 81db48536c9d7bb23c448af6a6f1de81df755585 (diff) | |
parent | a6a2f2c8c491617de702dc7d62bb55cbada4d42b (diff) |
Merge remote branch 'origin/master' into modesetting-101
Conflicts:
linux-core/drm_compat.c
Diffstat (limited to 'shared-core/i915_irq.c')
-rw-r--r-- | shared-core/i915_irq.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index dad6ef86..b9d137f4 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -415,6 +415,13 @@ u32 i915_get_vblank_counter(struct drm_device *dev, int plane) if (i915_in_vblank(dev, pipe)) count++; #endif + /* count may be reset by other driver(e.g. 2D driver), + we have no way to know if it is wrapped or resetted + when count is zero. do a rough guess. + */ + if (count == 0 && dev->last_vblank[pipe] < dev->max_vblank_count/2) + dev->last_vblank[pipe] = 0; + return count; } |