summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-core/i915_drv.h6
-rw-r--r--shared-core/i915_irq.c11
2 files changed, 16 insertions, 1 deletions
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index 98f58940..ef9f3638 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -254,6 +254,12 @@ extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller);
#define I915REG_INT_ENABLE_R 0x020a0
#define I915REG_INSTPM 0x020c0
+#define I915REG_PIPEASTAT 0x70024
+#define I915REG_PIPEBSTAT 0x71024
+
+#define I915_VBLANK_INTERRUPT_ENABLE (1UL<<17)
+#define I915_VBLANK_CLEAR (1UL<<1)
+
#define SRX_INDEX 0x3c4
#define SRX_DATA 0x3c5
#define SR01 1
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index 97723653..5ff87880 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -214,9 +214,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
drm_device_t *dev = (drm_device_t *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
u16 temp;
+ u32 pipea_stats, pipeb_stats;
+ pipea_stats = I915_READ(I915REG_PIPEASTAT);
+ pipeb_stats = I915_READ(I915REG_PIPEBSTAT);
+
temp = I915_READ16(I915REG_INT_IDENTITY_R);
-
temp &= (dev_priv->irq_enable_reg | USER_INT_FLAG);
#if 0
@@ -257,6 +260,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
if (dev_priv->swaps_pending > 0)
drm_locked_tasklet(dev, i915_vblank_tasklet);
+ I915_WRITE(I915REG_PIPEASTAT,
+ pipea_stats|I915_VBLANK_INTERRUPT_ENABLE|
+ I915_VBLANK_CLEAR);
+ I915_WRITE(I915REG_PIPEBSTAT,
+ pipeb_stats|I915_VBLANK_INTERRUPT_ENABLE|
+ I915_VBLANK_CLEAR);
}
return IRQ_HANDLED;