From 391f75e2bf13f105d9e4a120736ccdd8e3bc638b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Wed, 25 Sep 2013 19:55:26 +0300 Subject: [PATCH] drm/i915: Fix pre-CTG vblank counter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Ville Syrjälä Reviewed-by: Mario Kleiner Signed-off-by: Daniel Vetter --- Reading git-format-patch failed