Skip to content

Commit 2257e17

Browse files
danvetgregkh
authored andcommitted
drm/i915: call drm_handle_vblank before finish_page_flip
commit 74d4444 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1a8f00d commit 2257e17

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/gpu/drm/i915/i915_irq.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -680,12 +680,12 @@ static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS)
680680
intel_opregion_gse_intr(dev);
681681

682682
for (i = 0; i < 3; i++) {
683+
if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i)))
684+
drm_handle_vblank(dev, i);
683685
if (de_iir & (DE_PLANEA_FLIP_DONE_IVB << (5 * i))) {
684686
intel_prepare_page_flip(dev, i);
685687
intel_finish_page_flip_plane(dev, i);
686688
}
687-
if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i)))
688-
drm_handle_vblank(dev, i);
689689
}
690690

691691
/* check event from PCH */
@@ -767,6 +767,12 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
767767
if (de_iir & DE_GSE)
768768
intel_opregion_gse_intr(dev);
769769

770+
if (de_iir & DE_PIPEA_VBLANK)
771+
drm_handle_vblank(dev, 0);
772+
773+
if (de_iir & DE_PIPEB_VBLANK)
774+
drm_handle_vblank(dev, 1);
775+
770776
if (de_iir & DE_PLANEA_FLIP_DONE) {
771777
intel_prepare_page_flip(dev, 0);
772778
intel_finish_page_flip_plane(dev, 0);
@@ -777,12 +783,6 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
777783
intel_finish_page_flip_plane(dev, 1);
778784
}
779785

780-
if (de_iir & DE_PIPEA_VBLANK)
781-
drm_handle_vblank(dev, 0);
782-
783-
if (de_iir & DE_PIPEB_VBLANK)
784-
drm_handle_vblank(dev, 1);
785-
786786
/* check event from PCH */
787787
if (de_iir & DE_PCH_EVENT) {
788788
if (pch_iir & hotplug_mask)

0 commit comments

Comments
 (0)