diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2008-03-10 23:36:27 +0100 |
---|---|---|
committer | John Doe <glisse@freedesktop.org> | 2008-03-10 23:36:27 +0100 |
commit | a7e6ca62ad0d9c3c45fd9e1d81b59c2db2d714cf (patch) | |
tree | 8f757eeaa2c234af14ca1df515de7810e770ed91 /shared-core/i915_irq.c | |
parent | a7dc4d08b9b4f8fe6fcaa4c778f6dd3718d1e36a (diff) | |
parent | 9f19e79f955281b9de393219e4ad9835ffe29c49 (diff) |
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
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; } |