diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-24 17:59:43 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-03 05:18:16 -0400 |
commit | e0f608d7fd9b0f22c4fc4873139f9e702e778349 (patch) | |
tree | 8882055c0fce00bc832ee90bb82c0b1593a0ed3c /drivers/gpu/drm/i915/i915_irq.c | |
parent | fa883c62af00c577418a06ffb938d98bd6aba1bc (diff) |
drm/i915: pending_flip_is_done is gen3, name it so
And remove the cargo-culted copy from the valleyview irq handler.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 82bd8b6d3740..c2a4c12548a8 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -541,17 +541,13 @@ static irqreturn_t valleyview_irq_handler(DRM_IRQ_ARGS) | |||
541 | if (iir & I915_DISPLAY_PIPE_A_VBLANK_INTERRUPT) { | 541 | if (iir & I915_DISPLAY_PIPE_A_VBLANK_INTERRUPT) { |
542 | drm_handle_vblank(dev, 0); | 542 | drm_handle_vblank(dev, 0); |
543 | vblank++; | 543 | vblank++; |
544 | if (!dev_priv->flip_pending_is_done) { | 544 | intel_finish_page_flip(dev, 0); |
545 | intel_finish_page_flip(dev, 0); | ||
546 | } | ||
547 | } | 545 | } |
548 | 546 | ||
549 | if (iir & I915_DISPLAY_PIPE_B_VBLANK_INTERRUPT) { | 547 | if (iir & I915_DISPLAY_PIPE_B_VBLANK_INTERRUPT) { |
550 | drm_handle_vblank(dev, 1); | 548 | drm_handle_vblank(dev, 1); |
551 | vblank++; | 549 | vblank++; |
552 | if (!dev_priv->flip_pending_is_done) { | 550 | intel_finish_page_flip(dev, 0); |
553 | intel_finish_page_flip(dev, 0); | ||
554 | } | ||
555 | } | 551 | } |
556 | 552 | ||
557 | if (pipe_stats[pipe] & PIPE_LEGACY_BLC_EVENT_STATUS) | 553 | if (pipe_stats[pipe] & PIPE_LEGACY_BLC_EVENT_STATUS) |
@@ -1494,13 +1490,13 @@ static irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) | |||
1494 | 1490 | ||
1495 | if (iir & I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT) { | 1491 | if (iir & I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT) { |
1496 | intel_prepare_page_flip(dev, 0); | 1492 | intel_prepare_page_flip(dev, 0); |
1497 | if (dev_priv->flip_pending_is_done) | 1493 | if (dev_priv->gen3_flip_pending_is_done) |
1498 | intel_finish_page_flip_plane(dev, 0); | 1494 | intel_finish_page_flip_plane(dev, 0); |
1499 | } | 1495 | } |
1500 | 1496 | ||
1501 | if (iir & I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT) { | 1497 | if (iir & I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT) { |
1502 | intel_prepare_page_flip(dev, 1); | 1498 | intel_prepare_page_flip(dev, 1); |
1503 | if (dev_priv->flip_pending_is_done) | 1499 | if (dev_priv->gen3_flip_pending_is_done) |
1504 | intel_finish_page_flip_plane(dev, 1); | 1500 | intel_finish_page_flip_plane(dev, 1); |
1505 | } | 1501 | } |
1506 | 1502 | ||
@@ -1508,7 +1504,7 @@ static irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) | |||
1508 | if (pipe_stats[pipe] & vblank_status && | 1504 | if (pipe_stats[pipe] & vblank_status && |
1509 | drm_handle_vblank(dev, pipe)) { | 1505 | drm_handle_vblank(dev, pipe)) { |
1510 | vblank++; | 1506 | vblank++; |
1511 | if (!dev_priv->flip_pending_is_done) { | 1507 | if (!dev_priv->gen3_flip_pending_is_done) { |
1512 | i915_pageflip_stall_check(dev, pipe); | 1508 | i915_pageflip_stall_check(dev, pipe); |
1513 | intel_finish_page_flip(dev, pipe); | 1509 | intel_finish_page_flip(dev, pipe); |
1514 | } | 1510 | } |
@@ -2604,6 +2600,10 @@ void intel_irq_init(struct drm_device *dev) | |||
2604 | INIT_WORK(&dev_priv->error_work, i915_error_work_func); | 2600 | INIT_WORK(&dev_priv->error_work, i915_error_work_func); |
2605 | INIT_WORK(&dev_priv->rps_work, gen6_pm_rps_work); | 2601 | INIT_WORK(&dev_priv->rps_work, gen6_pm_rps_work); |
2606 | 2602 | ||
2603 | /* IIR "flip pending" bit means done if this bit is set */ | ||
2604 | if (IS_GEN3(dev) && (I915_READ(ECOSKPD) & ECO_FLIP_DONE)) | ||
2605 | dev_priv->gen3_flip_pending_is_done = true; | ||
2606 | |||
2607 | dev->driver->get_vblank_counter = i915_get_vblank_counter; | 2607 | dev->driver->get_vblank_counter = i915_get_vblank_counter; |
2608 | dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ | 2608 | dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ |
2609 | if (IS_G4X(dev) || IS_GEN5(dev) || IS_GEN6(dev) || IS_IVYBRIDGE(dev) || | 2609 | if (IS_G4X(dev) || IS_GEN5(dev) || IS_GEN6(dev) || IS_IVYBRIDGE(dev) || |