提交 88e04703 编写于 作者: J Jesse Barnes 提交者: Daniel Vetter

drm/i915/skl: AUX irqs have moved

Use the new AUX port irq bits where needed.

v2: Rebase on top of upstream changes
v3: Rebase on top of Oscar change to write IIR as soon as possible (Damien)
v4: Rebase on top of the for_each_pipe() change adding dev_priv as first
    argument (Damien)
Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 bd2e244f
...@@ -2221,6 +2221,11 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg) ...@@ -2221,6 +2221,11 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
irqreturn_t ret = IRQ_NONE; irqreturn_t ret = IRQ_NONE;
uint32_t tmp = 0; uint32_t tmp = 0;
enum pipe pipe; enum pipe pipe;
u32 aux_mask = GEN8_AUX_CHANNEL_A;
if (IS_GEN9(dev))
aux_mask |= GEN9_AUX_CHANNEL_B | GEN9_AUX_CHANNEL_C |
GEN9_AUX_CHANNEL_D;
master_ctl = I915_READ(GEN8_MASTER_IRQ); master_ctl = I915_READ(GEN8_MASTER_IRQ);
master_ctl &= ~GEN8_MASTER_IRQ_CONTROL; master_ctl &= ~GEN8_MASTER_IRQ_CONTROL;
...@@ -2253,7 +2258,8 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg) ...@@ -2253,7 +2258,8 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
if (tmp) { if (tmp) {
I915_WRITE(GEN8_DE_PORT_IIR, tmp); I915_WRITE(GEN8_DE_PORT_IIR, tmp);
ret = IRQ_HANDLED; ret = IRQ_HANDLED;
if (tmp & GEN8_AUX_CHANNEL_A)
if (tmp & aux_mask)
dp_aux_irq_handler(dev); dp_aux_irq_handler(dev);
else else
DRM_ERROR("Unexpected DE Port interrupt\n"); DRM_ERROR("Unexpected DE Port interrupt\n");
...@@ -3487,11 +3493,14 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv) ...@@ -3487,11 +3493,14 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
uint32_t de_pipe_masked = GEN8_PIPE_CDCLK_CRC_DONE; uint32_t de_pipe_masked = GEN8_PIPE_CDCLK_CRC_DONE;
uint32_t de_pipe_enables; uint32_t de_pipe_enables;
int pipe; int pipe;
u32 aux_en = GEN8_AUX_CHANNEL_A;
if (IS_GEN9(dev_priv)) if (IS_GEN9(dev_priv)) {
de_pipe_masked |= GEN9_PIPE_PLANE1_FLIP_DONE | de_pipe_masked |= GEN9_PIPE_PLANE1_FLIP_DONE |
GEN9_DE_PIPE_IRQ_FAULT_ERRORS; GEN9_DE_PIPE_IRQ_FAULT_ERRORS;
else aux_en |= GEN9_AUX_CHANNEL_B | GEN9_AUX_CHANNEL_C |
GEN9_AUX_CHANNEL_D;
} else
de_pipe_masked |= GEN8_PIPE_PRIMARY_FLIP_DONE | de_pipe_masked |= GEN8_PIPE_PRIMARY_FLIP_DONE |
GEN8_DE_PIPE_IRQ_FAULT_ERRORS; GEN8_DE_PIPE_IRQ_FAULT_ERRORS;
...@@ -3509,7 +3518,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv) ...@@ -3509,7 +3518,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
dev_priv->de_irq_mask[pipe], dev_priv->de_irq_mask[pipe],
de_pipe_enables); de_pipe_enables);
GEN5_IRQ_INIT(GEN8_DE_PORT_, ~GEN8_AUX_CHANNEL_A, GEN8_AUX_CHANNEL_A); GEN5_IRQ_INIT(GEN8_DE_PORT_, ~aux_en, aux_en);
} }
static int gen8_irq_postinstall(struct drm_device *dev) static int gen8_irq_postinstall(struct drm_device *dev)
......
...@@ -5072,6 +5072,9 @@ enum punit_power_well { ...@@ -5072,6 +5072,9 @@ enum punit_power_well {
#define GEN8_DE_PORT_IIR 0x44448 #define GEN8_DE_PORT_IIR 0x44448
#define GEN8_DE_PORT_IER 0x4444c #define GEN8_DE_PORT_IER 0x4444c
#define GEN8_PORT_DP_A_HOTPLUG (1 << 3) #define GEN8_PORT_DP_A_HOTPLUG (1 << 3)
#define GEN9_AUX_CHANNEL_D (1 << 27)
#define GEN9_AUX_CHANNEL_C (1 << 26)
#define GEN9_AUX_CHANNEL_B (1 << 25)
#define GEN8_AUX_CHANNEL_A (1 << 0) #define GEN8_AUX_CHANNEL_A (1 << 0)
#define GEN8_DE_MISC_ISR 0x44460 #define GEN8_DE_MISC_ISR 0x44460
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册