summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09999c9)
raw | patch | inline | side by side (parent: 09999c9)
author | Zou Nan hai <nanhai.zou@intel.com> | |
Mon, 3 Mar 2008 06:49:49 +0000 (14:49 +0800) | ||
committer | Zou Nan hai <nanhai.zou@intel.com> | |
Mon, 3 Mar 2008 06:49:49 +0000 (14:49 +0800) |
to leap it's vblank count a huge value.
This will stall some applications that switch video mode if vblank_mode is set to a non zero value in drirc.
This will stall some applications that switch video mode if vblank_mode is set to a non zero value in drirc.
shared-core/i915_irq.c | patch | blob | history |
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index fd08b6e89969feb55ef6b2575acf376bec160efa..126f0379006eaa380e7a250bd9d36a14c4a8d87d 100644 (file)
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
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;
}