diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index b40004b55977..5d433fc11ace 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -1205,7 +1205,7 @@ static void i915_pageflip_stall_check(struct drm_device *dev, int pipe) | |||
1205 | } else { | 1205 | } else { |
1206 | int dspaddr = DSPADDR(intel_crtc->plane); | 1206 | int dspaddr = DSPADDR(intel_crtc->plane); |
1207 | stall_detected = I915_READ(dspaddr) == (obj->gtt_offset + | 1207 | stall_detected = I915_READ(dspaddr) == (obj->gtt_offset + |
1208 | crtc->y * crtc->fb->pitch + | 1208 | crtc->y * crtc->fb->pitches[0] + |
1209 | crtc->x * crtc->fb->bits_per_pixel/8); | 1209 | crtc->x * crtc->fb->bits_per_pixel/8); |
1210 | } | 1210 | } |
1211 | 1211 | ||
@@ -1649,13 +1649,6 @@ static bool kick_ring(struct intel_ring_buffer *ring) | |||
1649 | I915_WRITE_CTL(ring, tmp); | 1649 | I915_WRITE_CTL(ring, tmp); |
1650 | return true; | 1650 | return true; |
1651 | } | 1651 | } |
1652 | if (IS_GEN6(dev) && | ||
1653 | (tmp & RING_WAIT_SEMAPHORE)) { | ||
1654 | DRM_ERROR("Kicking stuck semaphore on %s\n", | ||
1655 | ring->name); | ||
1656 | I915_WRITE_CTL(ring, tmp); | ||
1657 | return true; | ||
1658 | } | ||
1659 | return false; | 1652 | return false; |
1660 | } | 1653 | } |
1661 | 1654 | ||
@@ -1669,7 +1662,7 @@ void i915_hangcheck_elapsed(unsigned long data) | |||
1669 | { | 1662 | { |
1670 | struct drm_device *dev = (struct drm_device *)data; | 1663 | struct drm_device *dev = (struct drm_device *)data; |
1671 | drm_i915_private_t *dev_priv = dev->dev_private; | 1664 | drm_i915_private_t *dev_priv = dev->dev_private; |
1672 | uint32_t acthd, instdone, instdone1; | 1665 | uint32_t acthd, instdone, instdone1, acthd_bsd, acthd_blt; |
1673 | bool err = false; | 1666 | bool err = false; |
1674 | 1667 | ||
1675 | if (!i915_enable_hangcheck) | 1668 | if (!i915_enable_hangcheck) |
@@ -1686,16 +1679,21 @@ void i915_hangcheck_elapsed(unsigned long data) | |||
1686 | } | 1679 | } |
1687 | 1680 | ||
1688 | if (INTEL_INFO(dev)->gen < 4) { | 1681 | if (INTEL_INFO(dev)->gen < 4) { |
1689 | acthd = I915_READ(ACTHD); | ||
1690 | instdone = I915_READ(INSTDONE); | 1682 | instdone = I915_READ(INSTDONE); |
1691 | instdone1 = 0; | 1683 | instdone1 = 0; |
1692 | } else { | 1684 | } else { |
1693 | acthd = I915_READ(ACTHD_I965); | ||
1694 | instdone = I915_READ(INSTDONE_I965); | 1685 | instdone = I915_READ(INSTDONE_I965); |
1695 | instdone1 = I915_READ(INSTDONE1); | 1686 | instdone1 = I915_READ(INSTDONE1); |
1696 | } | 1687 | } |
1688 | acthd = intel_ring_get_active_head(&dev_priv->ring[RCS]); | ||
1689 | acthd_bsd = HAS_BSD(dev) ? | ||
1690 | intel_ring_get_active_head(&dev_priv->ring[VCS]) : 0; | ||
1691 | acthd_blt = HAS_BLT(dev) ? | ||
1692 | intel_ring_get_active_head(&dev_priv->ring[BCS]) : 0; | ||
1697 | 1693 | ||
1698 | if (dev_priv->last_acthd == acthd && | 1694 | if (dev_priv->last_acthd == acthd && |
1695 | dev_priv->last_acthd_bsd == acthd_bsd && | ||
1696 | dev_priv->last_acthd_blt == acthd_blt && | ||
1699 | dev_priv->last_instdone == instdone && | 1697 | dev_priv->last_instdone == instdone && |
1700 | dev_priv->last_instdone1 == instdone1) { | 1698 | dev_priv->last_instdone1 == instdone1) { |
1701 | if (dev_priv->hangcheck_count++ > 1) { | 1699 | if (dev_priv->hangcheck_count++ > 1) { |
@@ -1727,6 +1725,8 @@ void i915_hangcheck_elapsed(unsigned long data) | |||
1727 | dev_priv->hangcheck_count = 0; | 1725 | dev_priv->hangcheck_count = 0; |
1728 | 1726 | ||
1729 | dev_priv->last_acthd = acthd; | 1727 | dev_priv->last_acthd = acthd; |
1728 | dev_priv->last_acthd_bsd = acthd_bsd; | ||
1729 | dev_priv->last_acthd_blt = acthd_blt; | ||
1730 | dev_priv->last_instdone = instdone; | 1730 | dev_priv->last_instdone = instdone; |
1731 | dev_priv->last_instdone1 = instdone1; | 1731 | dev_priv->last_instdone1 = instdone1; |
1732 | } | 1732 | } |