aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-01-29 14:18:31 -0500
committerEric Anholt <eric@anholt.net>2010-01-29 18:29:47 -0500
commit013d5aa2bbb2ceacba7a0dad7f2a0eb20133323f (patch)
treeb68ecf3f8da523f88bd98a7731bff1364c92816a
parentf034b12dbb5749b11e9390e15e93ffa87ece8038 (diff)
drm/i915: page flip support for Ironlake
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@virtuousgeek.org> [anholt: hand-resolved for rebasing off of render power saving patch] Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index fcd87ad75fec..50ddf4a95c5e 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -309,11 +309,21 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev)
309 if (de_iir & DE_GSE) 309 if (de_iir & DE_GSE)
310 ironlake_opregion_gse_intr(dev); 310 ironlake_opregion_gse_intr(dev);
311 311
312 if (de_iir & DE_PIPEA_VBLANK) 312 if (de_iir & DE_PLANEA_FLIP_DONE)
313 intel_prepare_page_flip(dev, 0);
314
315 if (de_iir & DE_PLANEB_FLIP_DONE)
316 intel_prepare_page_flip(dev, 1);
317
318 if (de_iir & DE_PIPEA_VBLANK) {
313 drm_handle_vblank(dev, 0); 319 drm_handle_vblank(dev, 0);
320 intel_finish_page_flip(dev, 0);
321 }
314 322
315 if (de_iir & DE_PIPEB_VBLANK) 323 if (de_iir & DE_PIPEB_VBLANK) {
316 drm_handle_vblank(dev, 1); 324 drm_handle_vblank(dev, 1);
325 intel_finish_page_flip(dev, 1);
326 }
317 327
318 /* check event from PCH */ 328 /* check event from PCH */
319 if ((de_iir & DE_PCH_EVENT) && 329 if ((de_iir & DE_PCH_EVENT) &&
@@ -1022,7 +1032,8 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
1022{ 1032{
1023 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; 1033 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
1024 /* enable kind of interrupts always enabled */ 1034 /* enable kind of interrupts always enabled */
1025 u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT; 1035 u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
1036 DE_PLANEA_FLIP_DONE | DE_PLANEB_FLIP_DONE;
1026 u32 render_mask = GT_USER_INTERRUPT; 1037 u32 render_mask = GT_USER_INTERRUPT;
1027 u32 hotplug_mask = SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG | 1038 u32 hotplug_mask = SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG |
1028 SDE_PORTC_HOTPLUG | SDE_PORTD_HOTPLUG; 1039 SDE_PORTC_HOTPLUG | SDE_PORTD_HOTPLUG;