Skip to content

Commit

Permalink
drm/i915: Use GEN5_IRQ_RESET() on vlv/chv
Browse files Browse the repository at this point in the history
Replace the hand rolled IIR,IER,IMR disable sequences with
GEN5_IRQ_RESET().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ville Syrjälä authored and Daniel Vetter committed Nov 7, 2014
1 parent 76e4186 commit 23a09c7
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -3128,11 +3128,8 @@ static void valleyview_irq_preinstall(struct drm_device *dev)
I915_WRITE(PORT_HOTPLUG_STAT, I915_READ(PORT_HOTPLUG_STAT));
for_each_pipe(dev_priv, pipe)
I915_WRITE(PIPESTAT(pipe), 0xffff);
I915_WRITE(VLV_IMR, 0xffffffff);
I915_WRITE(VLV_IER, 0x0);
I915_WRITE(VLV_IIR, 0xffffffff);
I915_WRITE(VLV_IIR, 0xffffffff);
POSTING_READ(VLV_IIR);

GEN5_IRQ_RESET(VLV_);
}

static void gen8_gt_irq_reset(struct drm_i915_private *dev_priv)
Expand Down Expand Up @@ -3197,11 +3194,7 @@ static void cherryview_irq_preinstall(struct drm_device *dev)
for_each_pipe(dev_priv, pipe)
I915_WRITE(PIPESTAT(pipe), 0xffff);

I915_WRITE(VLV_IMR, 0xffffffff);
I915_WRITE(VLV_IER, 0x0);
I915_WRITE(VLV_IIR, 0xffffffff);
I915_WRITE(VLV_IIR, 0xffffffff);
POSTING_READ(VLV_IIR);
GEN5_IRQ_RESET(VLV_);
}

static void ibx_hpd_irq_setup(struct drm_device *dev)
Expand Down Expand Up @@ -3611,11 +3604,7 @@ static void valleyview_irq_uninstall(struct drm_device *dev)

dev_priv->irq_mask = 0;

I915_WRITE(VLV_IMR, 0xffffffff);
I915_WRITE(VLV_IER, 0x0);
I915_WRITE(VLV_IIR, 0xffffffff);
I915_WRITE(VLV_IIR, 0xffffffff);
POSTING_READ(VLV_IIR);
GEN5_IRQ_RESET(VLV_);
}

static void cherryview_irq_uninstall(struct drm_device *dev)
Expand All @@ -3639,11 +3628,7 @@ static void cherryview_irq_uninstall(struct drm_device *dev)
for_each_pipe(dev_priv, pipe)
I915_WRITE(PIPESTAT(pipe), 0xffff);

I915_WRITE(VLV_IMR, 0xffffffff);
I915_WRITE(VLV_IER, 0x0);
I915_WRITE(VLV_IIR, 0xffffffff);
I915_WRITE(VLV_IIR, 0xffffffff);
POSTING_READ(VLV_IIR);
GEN5_IRQ_RESET(VLV_);
}

static void ironlake_irq_uninstall(struct drm_device *dev)
Expand Down

0 comments on commit 23a09c7

Please sign in to comment.