drm/i915: Fix scanoutpos calculations for interlaced modes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 28 Oct 2013 14:31:41 +0000 (16:31 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 20 Jan 2014 09:06:34 +0000 (11:06 +0200)
commitd31faf65b8300fa120f4b31d90270fbac36fc779
treea3012f657c36ee8f8dd730fd8b2f78beeafee1a8
parent3c184f69917d16e295934fcbe0803355b544df64
drm/i915: Fix scanoutpos calculations for interlaced modes

The scanline counter counts lines in the current field, not the entire
frame. But the crtc_ timings are the values for the entire frame. Divide
the vertical timings by 2 to make them match the scanline counter.

The rounding was carefully chosen to make it do the right thing wrt. the
observed scanline counter and ISR vblank bit behaviour.

Reviewed-by: mario.kleiner.de@gmail.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/i915_irq.c