@@ -310,19 +310,17 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev)
ironlake_opregion_gse_intr(dev);
if (de_iir & DE_PLANEA_FLIP_DONE)
- intel_prepare_page_flip(dev, 0);
+ intel_finish_page_flip(dev, 0);
if (de_iir & DE_PLANEB_FLIP_DONE)
- intel_prepare_page_flip(dev, 1);
+ intel_finish_page_flip(dev, 1);
if (de_iir & DE_PIPEA_VBLANK) {
drm_handle_vblank(dev, 0);
- intel_finish_page_flip(dev, 0);
}
if (de_iir & DE_PIPEB_VBLANK) {
drm_handle_vblank(dev, 1);
- intel_finish_page_flip(dev, 1);
}
/* check event from PCH */
@@ -4208,6 +4208,13 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
/* Reference the old fb object for the scheduled work. */
drm_gem_object_reference(work->obj);
+ /* On Ironlake, page flip irq is for 'done' event, so try to
+ make page flip prepare here, and will handle finish job after
+ receive page flip done irq.
+ */
+ if (IS_IRONLAKE(dev))
+ intel_prepare_page_flip(dev, intel_crtc->plane);
+
crtc->fb = fb;
i915_gem_object_flush_write_domain(obj);
drm_vblank_get(dev, intel_crtc->pipe);