drm/i915: Improve gen3/4 frame counter
drm/i915: Improve gen3/4 frame counter

Currently the logic to fix up the frame counter on gen3/4 assumes that
start of vblank occurs at vblank_start*htotal pixels, when in fact
it occurs htotal-hsync_start pixels earlier. Apply the appropriate
adjustment to make the frame counter more accurate.

Also fix the vblank start position for interlaced display modes.

Reviewed-by: Imre Deak <fbd5edba1988036c8923f0cca0cce6ac4811db29@intel.com>
Signed-off-by: Ville Syrjälä <cd6e8d405ca90be3a03d5427c5b24fbd2d68dcc4@linux.intel.com>
Reviewed-by: "Akash Goel <11b039cb6f0b7b79cc94a1c3a9d4b78041f0b7bc@gmail.com>"
Reviewed-by: "Sourab Gupta <3eeec7cb03cb7d4d5b337cf054883853368b158c@gmail.com>"
Signed-off-by: Daniel Vetter <c1b6782c4af8f0673da8923a0702a1832e5940f4@ffwll.ch>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs