diff options
author | Hong Liu <hong.liu@intel.com> | 2008-04-18 16:49:23 +0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@jbarnes-t61.(none)> | 2008-04-22 18:34:11 -0700 |
commit | 8a390e058fcea70b0c3a912543816bdf4c3e7c4c (patch) | |
tree | 3b0b547cd44364ba82bd0ac29215a00a617a0510 /shared-core/i915_irq.c | |
parent | c250104c8f81026b4191ec8b2a709ff7ab5baedb (diff) |
clear interrupt status before install irq
On my 865G machine, it seems the CPU will receive interrupt before
irq_postinstall is called. This will cause kernel oops because vblank is not
inited at that time. Clear interrupt status before install seems fixing this
problem.
Signed-off-by: Hong Liu <hong.liu@intel.com>
Diffstat (limited to 'shared-core/i915_irq.c')
-rw-r--r-- | shared-core/i915_irq.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 8f136c8f..422e81ed 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -1217,14 +1217,25 @@ int i915_vblank_swap(struct drm_device *dev, void *data, void i915_driver_irq_preinstall(struct drm_device * dev) { struct drm_i915_private *dev_priv = (struct drm_i915_private *) dev->dev_private; + u32 tmp; + + tmp = I915_READ(I915REG_PIPEASTAT); + I915_WRITE(I915REG_PIPEASTAT, tmp); + tmp = I915_READ(I915REG_PIPEBSTAT); + I915_WRITE(I915REG_PIPEBSTAT, tmp); + I915_WRITE16(I915REG_HWSTAM, 0xeffe); if (IS_I9XX(dev) && !IS_I915G(dev) && !IS_I915GM(dev)) { I915_WRITE(I915REG_INT_MASK_R, 0x0); I915_WRITE(I915REG_INT_ENABLE_R, 0x0); + tmp = I915_READ(I915REG_INT_IDENTITY_R); + I915_WRITE(I915REG_INT_IDENTITY_R, tmp); } else { I915_WRITE16(I915REG_INT_MASK_R, 0x0); I915_WRITE16(I915REG_INT_ENABLE_R, 0x0); + tmp = I915_READ16(I915REG_INT_IDENTITY_R); + I915_WRITE16(I915REG_INT_IDENTITY_R, tmp); } } |