[Intel-gfx] [PATCH] drm/i915: page flip support for Ironlake

Jesse Barnes jbarnes at virtuousgeek.org
Fri Jan 29 20:18:31 CET 2010


This patch adds support for page flipping on Ironlake, which uses
different interrupt bits for triggering flip submit IRQs.

Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

--

This doesn't fix what seems to be an unrelated bug with display
flipping on Ironlake.  There seems to be a pitch issue; flips work ok
but flipped buffers look slanted.

Sits on top of Li Peng's patch for Ironlake vblank support.

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 1b5b1ea..c83ae53 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -365,11 +365,21 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev)
 		i915_handle_rps_change(dev);
 	}
 
-	if (de_iir & DE_PIPEA_VBLANK)
+	if (de_iir & DE_PLANEA_FLIP_DONE)
+		intel_prepare_page_flip(dev, 0);
+
+	if (de_iir & DE_PLANEB_FLIP_DONE)
+		intel_prepare_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)
+	if (de_iir & DE_PIPEB_VBLANK) {
 		drm_handle_vblank(dev, 1);
+		intel_finish_page_flip(dev, 1);
+	}
 
 	/* check event from PCH */
 	if ((de_iir & DE_PCH_EVENT) &&
@@ -1078,7 +1088,8 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
 {
 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
 	/* enable kind of interrupts always enabled */
-	u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
+	u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_PLANEA_FLIP_DONE |
+			   DE_PLANEB_FLIP_DONE | DE_GSE | DE_PCH_EVENT |
 			   DE_PIPEA_VBLANK | DE_PIPEB_VBLANK;
 	u32 render_mask = GT_USER_INTERRUPT;
 	u32 hotplug_mask = SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG |



More information about the Intel-gfx mailing list