]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Fix vblank timestamping constants for interlaced modes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 28 Oct 2013 17:53:25 +0000 (19:53 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 20 Jan 2014 10:20:51 +0000 (12:20 +0200)
commit9aabb21f134e0e205fb215eec383949755c9df35
treedaf427711e968c382b8e4ce3346db610c19e85a6
parent06dcfd4124f3ff614faa71c250b40c7f9f9b10a1
drm: Fix vblank timestamping constants for interlaced modes

We're currently miscalculating the line and pixel durations for
interlaced modes. crtc_htotal and crtc_vtotal are the full frame
timings, and so is crtc_clock, so we can compute the line
and pixel durations from those w/o any extra adjustments. But
we actually want framedur_ns to be the field, not frame, duration,
so we must divide it by two.

This should make the scanout based vblank timestamp corrections
work correctly with interlaced modes, at least for i915. It all
depends whether we keep the field or frame timings in the display
mode crtc_ timings.

v2: Preserve halve->half typo fix that happened in the meantine

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