Skip to content

Commit 74d4444

Browse files
committed
drm/i915: call drm_handle_vblank before finish_page_flip
... 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. Cc: stable@vger.kernel.org Reviewed-by: mario.kleiner@tuebingen.mpg.de Tested-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 4d0f817 commit 74d4444

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
@@ -698,12 +698,12 @@ static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS)
698698
intel_opregion_gse_intr(dev);
699699

700700
for (i = 0; i < 3; i++) {
701+
if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i)))
702+
drm_handle_vblank(dev, i);
701703
if (de_iir & (DE_PLANEA_FLIP_DONE_IVB << (5 * i))) {
702704
intel_prepare_page_flip(dev, i);
703705
intel_finish_page_flip_plane(dev, i);
704706
}
705-
if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i)))
706-
drm_handle_vblank(dev, i);
707707
}
708708

709709
/* check event from PCH */
@@ -785,6 +785,12 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
785785
if (de_iir & DE_GSE)
786786
intel_opregion_gse_intr(dev);
787787

788+
if (de_iir & DE_PIPEA_VBLANK)
789+
drm_handle_vblank(dev, 0);
790+
791+
if (de_iir & DE_PIPEB_VBLANK)
792+
drm_handle_vblank(dev, 1);
793+
788794
if (de_iir & DE_PLANEA_FLIP_DONE) {
789795
intel_prepare_page_flip(dev, 0);
790796
intel_finish_page_flip_plane(dev, 0);
@@ -795,12 +801,6 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
795801
intel_finish_page_flip_plane(dev, 1);
796802
}
797803

798-
if (de_iir & DE_PIPEA_VBLANK)
799-
drm_handle_vblank(dev, 0);
800-
801-
if (de_iir & DE_PIPEB_VBLANK)
802-
drm_handle_vblank(dev, 1);
803-
804804
/* check event from PCH */
805805
if (de_iir & DE_PCH_EVENT) {
806806
if (pch_iir & hotplug_mask)

0 commit comments

Comments
 (0)