Commit be30b29f authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Daniel Vetter

drm/i915: add ironlake_irq_reset

To merge the common code of ironlake_irq_preinstall and
ironlake_irq_uninstall.

We should also probably do something about that HSWSTAM write on a
later commit.
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
[danvet: Fix compile fail due to drm_i915_private_t typedef removal.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent d4eb6b10
...@@ -2908,12 +2908,10 @@ static void gen5_gt_irq_reset(struct drm_device *dev) ...@@ -2908,12 +2908,10 @@ static void gen5_gt_irq_reset(struct drm_device *dev)
/* drm_dma.h hooks /* drm_dma.h hooks
*/ */
static void ironlake_irq_preinstall(struct drm_device *dev) static void ironlake_irq_reset(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(HWSTAM, 0xeffe);
GEN5_IRQ_RESET(DE); GEN5_IRQ_RESET(DE);
if (IS_GEN7(dev)) if (IS_GEN7(dev))
I915_WRITE(GEN7_ERR_INT, 0xffffffff); I915_WRITE(GEN7_ERR_INT, 0xffffffff);
...@@ -2923,6 +2921,15 @@ static void ironlake_irq_preinstall(struct drm_device *dev) ...@@ -2923,6 +2921,15 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
ibx_irq_reset(dev); ibx_irq_reset(dev);
} }
static void ironlake_irq_preinstall(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(HWSTAM, 0xeffe);
ironlake_irq_reset(dev);
}
static void valleyview_irq_preinstall(struct drm_device *dev) static void valleyview_irq_preinstall(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -3360,13 +3367,7 @@ static void ironlake_irq_uninstall(struct drm_device *dev) ...@@ -3360,13 +3367,7 @@ static void ironlake_irq_uninstall(struct drm_device *dev)
I915_WRITE(HWSTAM, 0xffffffff); I915_WRITE(HWSTAM, 0xffffffff);
GEN5_IRQ_RESET(DE); ironlake_irq_reset(dev);
if (IS_GEN7(dev))
I915_WRITE(GEN7_ERR_INT, 0xffffffff);
gen5_gt_irq_reset(dev);
ibx_irq_reset(dev);
} }
static void i8xx_irq_preinstall(struct drm_device * dev) static void i8xx_irq_preinstall(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