mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 09:18:04 +02:00
[i915] 2D driver may reset Frame count value, this may lead driver
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 commit is contained in:
parent
09999c90ab
commit
63fd6f284d
1 changed files with 7 additions and 0 deletions
|
|
@ -406,6 +406,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue