]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix pre-CTG vblank counter
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 25 Sep 2013 16:55:26 +0000 (19:55 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 11 Oct 2013 21:41:55 +0000 (23:41 +0200)
commite8f375856ed7f53656b5543b8f30bbe7151c55f7
tree6ffaec31b1004d07d7a0438af692840664a7a6ea
parent02f40a9afb6502a002e15e74242da8733a8fda77
drm/i915: Fix pre-CTG vblank counter

The old style frame counter increments at the start of active video.
However for i915_get_vblank_counter() we want a counter that increments
at the start of vblank.

Fortunately the low frame counter register also contains the pixel
counter for the current frame. We can can compare that against the
vblank start pixel count to determine if we need to increment the
frame counter by 1 to get the correct answer.

Also reorganize the function pointer assignments in intel_irq_init() a
bit to avoid confusing people.

Cc: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c