[Intel-gfx] [PATCH] fix interrupt request miss problem in bsd ring for g4x

Feng, Boqun boqun.feng at intel.com
Tue Apr 26 12:12:52 CEST 2011


Signed-off-by: Feng, Boqun <boqun.feng at intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index e9e6f71..6606ca7 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -609,8 +609,12 @@ ring_get_irq(struct intel_ring_buffer *ring, u32 flag)
 	       return false;
 
 	spin_lock(&ring->irq_lock);
-	if (ring->irq_refcount++ == 0)
-		ironlake_enable_irq(dev_priv, flag);
+	if (ring->irq_refcount++ == 0) {
+        if (HAS_PCH_SPLIT(dev))
+		    ironlake_enable_irq(dev_priv, flag);
+        else
+            i915_enable_irq(dev_priv, flag);
+    }
 	spin_unlock(&ring->irq_lock);
 
 	return true;
@@ -623,8 +627,12 @@ ring_put_irq(struct intel_ring_buffer *ring, u32 flag)
 	drm_i915_private_t *dev_priv = dev->dev_private;
 
 	spin_lock(&ring->irq_lock);
-	if (--ring->irq_refcount == 0)
-		ironlake_disable_irq(dev_priv, flag);
+	if (--ring->irq_refcount == 0) {
+        if (HAS_PCH_SPLIT(dev))
+		    ironlake_disable_irq(dev_priv, flag);
+        else
+            i915_disable_irq(dev_priv, flag);
+    }
 	spin_unlock(&ring->irq_lock);
 }
 
@@ -666,12 +674,22 @@ gen6_ring_put_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
 static bool
 bsd_ring_get_irq(struct intel_ring_buffer *ring)
 {
-	return ring_get_irq(ring, GT_BSD_USER_INTERRUPT);
+	struct drm_device *dev = ring->dev;
+
+    if (HAS_PCH_SPLIT(dev))
+	    return ring_get_irq(ring, GT_BSD_USER_INTERRUPT);
+    else
+        return ring_get_irq(ring, I915_BSD_USER_INTERRUPT);
 }
 static void
 bsd_ring_put_irq(struct intel_ring_buffer *ring)
 {
-	ring_put_irq(ring, GT_BSD_USER_INTERRUPT);
+	struct drm_device *dev = ring->dev;
+    
+    if (HAS_PCH_SPLIT(dev))
+	    ring_put_irq(ring, GT_BSD_USER_INTERRUPT);
+    else
+        ring_put_irq(ring, I915_BSD_USER_INTERRUPT);
 }
 
 static int
-- 
1.7.3.2




More information about the Intel-gfx mailing list