Commit fd547d25 authored by Vinit Azad's avatar Vinit Azad Committed by Daniel Vetter

drm/i915: Only unmask required PM interrupts

Un-masking all PM interrupts causes hardware to generate
interrupts regardless of whether the interrupts are enabled
on the DE side. Since turbo only need up/down threshold and
rc6 timeout interrupt, mask all other interrupts bits to avoid
unnecessary overhead/wake up.

Note that our interrupt handler isn't being fired since we do set the
IER bits properly (IIR bits aren't set). The overhead isn't because
our driver is reacting to these interrupts, but because hardware keeps
generating internal messages when PMINTRMSK doesn't mask out the
up/down EI interrupts (which happen periodically).

Change-Id: I6c947df6fd5f60584d39b9e8b8c89faa51a5e827
Signed-off-by: default avatarVinit Azad <vinit.azad@intel.com>
[danvet: Add follow-up explanation of the precise effects from Vinit
as a note to the commit message.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 6aedd1f5
...@@ -3453,8 +3453,8 @@ static void gen6_enable_rps_interrupts(struct drm_device *dev) ...@@ -3453,8 +3453,8 @@ static void gen6_enable_rps_interrupts(struct drm_device *dev)
I915_WRITE(GEN6_PMIMR, I915_READ(GEN6_PMIMR) & ~GEN6_PM_RPS_EVENTS); I915_WRITE(GEN6_PMIMR, I915_READ(GEN6_PMIMR) & ~GEN6_PM_RPS_EVENTS);
I915_WRITE(GEN6_PMIIR, GEN6_PM_RPS_EVENTS); I915_WRITE(GEN6_PMIIR, GEN6_PM_RPS_EVENTS);
spin_unlock_irq(&dev_priv->irq_lock); spin_unlock_irq(&dev_priv->irq_lock);
/* unmask all PM interrupts */ /* only unmask PM interrupts we need. Mask all others. */
I915_WRITE(GEN6_PMINTRMSK, 0); I915_WRITE(GEN6_PMINTRMSK, ~GEN6_PM_RPS_EVENTS);
} }
static void gen6_enable_rps(struct drm_device *dev) static void gen6_enable_rps(struct drm_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment