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: NVille Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: NMario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Showing
想要评论请 注册 或 登录