drm/i915: Future proof interrupt handler.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 2 Sep 2015 22:19:24 +0000 (15:19 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 4 Sep 2015 08:10:05 +0000 (10:10 +0200)
These functions are already being called for gen >= 9,
so let's be sure when this happens we use whatever is
there already for the latest platform.

No functional change.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c

index ff543a4880b93b19cb4b6d6ea16873ed0b0152c1..ca6d806a195ab50a0ea67236d5b218cf31bb840c 100644 (file)
@@ -2155,7 +2155,7 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
        if (!intel_irqs_enabled(dev_priv))
                return IRQ_NONE;
 
-       if (IS_GEN9(dev))
+       if (INTEL_INFO(dev_priv)->gen >= 9)
                aux_mask |=  GEN9_AUX_CHANNEL_B | GEN9_AUX_CHANNEL_C |
                        GEN9_AUX_CHANNEL_D;
 
@@ -2238,7 +2238,7 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
                            intel_pipe_handle_vblank(dev, pipe))
                                intel_check_page_flip(dev, pipe);
 
-                       if (IS_GEN9(dev))
+                       if (INTEL_INFO(dev_priv)->gen >= 9)
                                flip_done = pipe_iir & GEN9_PIPE_PLANE1_FLIP_DONE;
                        else
                                flip_done = pipe_iir & GEN8_PIPE_PRIMARY_FLIP_DONE;
@@ -2256,7 +2256,7 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
                                                                    pipe);
 
 
-                       if (IS_GEN9(dev))
+                       if (INTEL_INFO(dev_priv)->gen >= 9)
                                fault_errors = pipe_iir & GEN9_DE_PIPE_IRQ_FAULT_ERRORS;
                        else
                                fault_errors = pipe_iir & GEN8_DE_PIPE_IRQ_FAULT_ERRORS;
@@ -3539,7 +3539,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
        u32 de_port_enables;
        enum pipe pipe;
 
-       if (IS_GEN9(dev_priv)) {
+       if (INTEL_INFO(dev_priv)->gen >= 9) {
                de_pipe_masked |= GEN9_PIPE_PLANE1_FLIP_DONE |
                                  GEN9_DE_PIPE_IRQ_FAULT_ERRORS;
                de_port_masked |= GEN9_AUX_CHANNEL_B | GEN9_AUX_CHANNEL_C |