Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117238
b: refs/heads/master
c: 053d7f2
h: refs/heads/master
v: v3
  • Loading branch information
Eric Anholt authored and Dave Airlie committed Oct 23, 2008
1 parent 81ee39b commit 5225a04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35ad68c18148a18938ff4f40e945c9734e7d2265
refs/heads/master: 053d7f244a8739d96d316c77a97cd063804c8e35
10 changes: 9 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,15 @@ int i915_enable_vblank(struct drm_device *dev, int plane)
}

spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
/* Enabling vblank events in IMR comes before PIPESTAT write, or
* there's a race where the PIPESTAT vblank bit gets set to 1, so
* the OR of enabled PIPESTAT bits goes to 1, so the PIPExEVENT in
* ISR flashes to 1, but the IIR bit doesn't get set to 1 because
* IMR masks it. It doesn't ever get set after we clear the masking
* in IMR because the ISR bit is edge, not level-triggered, on the
* OR of PIPESTAT bits.
*/
i915_enable_irq(dev_priv, interrupt);
pipestat = I915_READ(pipestat_reg);
if (IS_I965G(dev))
pipestat |= PIPE_START_VBLANK_INTERRUPT_ENABLE;
Expand All @@ -615,7 +624,6 @@ int i915_enable_vblank(struct drm_device *dev, int plane)
PIPE_VBLANK_INTERRUPT_STATUS);
I915_WRITE(pipestat_reg, pipestat);
(void) I915_READ(pipestat_reg); /* Posting read */
i915_enable_irq(dev_priv, interrupt);
spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags);

return 0;
Expand Down

0 comments on commit 5225a04

Please sign in to comment.