aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-24 08:04:12 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-03 05:18:08 -0400
commit6b26c86d615747f67fede6ca9609b0f8b2037d11 (patch)
tree5abfc0fecc0549878c0b93fb81e8fa535c1439b6 /drivers/gpu/drm/i915/i915_irq.c
parentee7b9f93fd96a72e5d09e2b44024c11880873c6b (diff)
drm/i915: create macros to handle masked bits
... and put them to so good use. Note that there's functional change in vlv clock gating code, we now no longer spuriously read back the current value of the bit. According to Bspec the high bits should always read zero, so ORing this in should have no effect. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index d45b43a35f15..26172eef9787 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1648,7 +1648,7 @@ static int i915_enable_vblank(struct drm_device *dev, int pipe)
1648 1648
1649 /* maintain vblank delivery even in deep C-states */ 1649 /* maintain vblank delivery even in deep C-states */
1650 if (dev_priv->info->gen == 3) 1650 if (dev_priv->info->gen == 3)
1651 I915_WRITE(INSTPM, INSTPM_AGPBUSY_DIS << 16); 1651 I915_WRITE(INSTPM, _MASKED_BIT_DISABLE(INSTPM_AGPBUSY_DIS));
1652 spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); 1652 spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
1653 1653
1654 return 0; 1654 return 0;
@@ -1722,8 +1722,7 @@ static void i915_disable_vblank(struct drm_device *dev, int pipe)
1722 1722
1723 spin_lock_irqsave(&dev_priv->irq_lock, irqflags); 1723 spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
1724 if (dev_priv->info->gen == 3) 1724 if (dev_priv->info->gen == 3)
1725 I915_WRITE(INSTPM, 1725 I915_WRITE(INSTPM, _MASKED_BIT_ENABLE(INSTPM_AGPBUSY_DIS));
1726 INSTPM_AGPBUSY_DIS << 16 | INSTPM_AGPBUSY_DIS);
1727 1726
1728 i915_disable_pipestat(dev_priv, pipe, 1727 i915_disable_pipestat(dev_priv, pipe,
1729 PIPE_VBLANK_INTERRUPT_ENABLE | 1728 PIPE_VBLANK_INTERRUPT_ENABLE |