Just moving it to reduce the tabs and avoid break code lines into several lines. No behavior changes intended here. Signed-off-by: José Roberto de Souza <jose.souza@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_irq.c | 63 +++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 2f788291cfe0..875102eb9ed0 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2701,41 +2701,50 @@ static u32 gen8_de_port_aux_mask(struct drm_i915_private *dev_priv) return mask; } -static irqreturn_t -gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl) +static enum irqreturn +gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv) { - irqreturn_t ret = IRQ_NONE; - u32 iir; - enum pipe pipe; + u32 iir = I915_READ(GEN8_DE_MISC_IIR); + enum irqreturn ret = IRQ_NONE; + bool found = false; - if (master_ctl & GEN8_DE_MISC_IRQ) { - iir = I915_READ(GEN8_DE_MISC_IIR); - if (iir) { - bool found = false; - - I915_WRITE(GEN8_DE_MISC_IIR, iir); - ret = IRQ_HANDLED; + if (!iir) { + DRM_ERROR("The master control interrupt lied (DE MISC)!\n"); + return ret; + } - if (iir & GEN8_DE_MISC_GSE) { - intel_opregion_asle_intr(dev_priv); - found = true; - } + I915_WRITE(GEN8_DE_MISC_IIR, iir); + ret = IRQ_HANDLED; - if (iir & GEN8_DE_EDP_PSR) { - u32 psr_iir = I915_READ(EDP_PSR_IIR); + if (iir & GEN8_DE_MISC_GSE) { + intel_opregion_asle_intr(dev_priv); + found = true; + } - intel_psr_irq_handler(dev_priv, psr_iir); - I915_WRITE(EDP_PSR_IIR, psr_iir); - found = true; - } + if (iir & GEN8_DE_EDP_PSR) { + u32 psr_iir = I915_READ(EDP_PSR_IIR); - if (!found) - DRM_ERROR("Unexpected DE Misc interrupt\n"); - } - else - DRM_ERROR("The master control interrupt lied (DE MISC)!\n"); + intel_psr_irq_handler(dev_priv, psr_iir); + I915_WRITE(EDP_PSR_IIR, psr_iir); + found = true; } + if (!found) + DRM_ERROR("Unexpected DE Misc interrupt\n"); + + return ret; +} + +static irqreturn_t +gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl) +{ + irqreturn_t ret = IRQ_NONE; + u32 iir; + enum pipe pipe; + + if (master_ctl & GEN8_DE_MISC_IRQ) + ret = gen8_de_misc_irq_handler(dev_priv); + if (INTEL_GEN(dev_priv) >= 11 && (master_ctl & GEN11_DE_HPD_IRQ)) { iir = I915_READ(GEN11_DE_HPD_IIR); if (iir) { -- 2.21.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx