mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-29 22:00:17 +01:00
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>
This commit is contained in:
parent
c250104c8f
commit
8a390e058f
1 changed files with 11 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue