drm/i915: Improve the accuracy of get_scanout_pos on CTG+
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 23 Sep 2013 10:02:07 +0000 (13:02 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 14 Oct 2013 15:12:35 +0000 (17:12 +0200)
commit54ddcbd26a677524d4bcd9f2a9539e6d743592d8
treea6968305855a797f1507ee06b4159c15cfcecf2d
parent3aa18df8f22f24ab6ccd4155cb34ef6bff2f2a1c
drm/i915: Improve the accuracy of get_scanout_pos on CTG+

The DSL register increments at the start of horizontal sync, so it
manages to miss the entire active portion of the current line.

Improve the get_scanoutpos accuracy a bit when the scanout position is
close to the start or end of vblank. We can do that by double checking
the DSL value against the vblank status bit from ISR.

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