drm/i915: call drm_handle_vblank before finish_page_flip
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 2 Oct 2012 15:54:35 +0000 (17:54 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:49:31 +0000 (03:49 +0100)
commit40a0ab597cbc4d09d17e5af410c7df7b1b915f2e
tree6cc6d970662eaefd1ac08796c123354cadd3f415
parent9fa4daeca1536418310d338ffc0d0e0d88594157
drm/i915: call drm_handle_vblank before finish_page_flip

commit 74d44445afb9f50126eba052adeb89827cee88f3 upstream.

... since finish_page_flip needs the vblank timestamp generated
in drm_handle_vblank. Somehow all the gmch platforms get it right,
but all the pch platform irq handlers get is wrong. Hooray for copy&
pasting!

Currently this gets papered over by a gross hack in finish_page_flip.
A second patch will remove that.

Note that without this, the new timestamp sanity checks in flip_test
occasionally get tripped up, hence the cc: stable tag.

Reviewed-by: mario.kleiner@tuebingen.mpg.de
Tested-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[bwh: Backported to 3.2: no loop over pipes in ivybridge_irq_handler(),
 so make a similar change to that in ironlake_irq_handler()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/i915_irq.c