drm/i915: Iterate over pipes and skip the disabled one
It should not be assumed that a disabled display pipe will be always last the pipe. for_each_pipe() should iterate over I915_MAX_PIPES and check for the disabled pipe and skip that pipe so that it should not initialize the intel crtc for any disabled pipes. Due to changes in for_each_pipe() macro, it requires to handle the below compilation error. "suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else]" v2: - Cosmetic changes, removed unwanted parentheses. [Ville] Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200224124004.26712-2-anshuman.gupta@intel.com
This commit is contained in:
parent
80f286a552
commit
b8b65ccda5
|
@ -313,10 +313,11 @@ enum phy_fia {
|
|||
};
|
||||
|
||||
#define for_each_pipe(__dev_priv, __p) \
|
||||
for ((__p) = 0; (__p) < INTEL_NUM_PIPES(__dev_priv); (__p)++)
|
||||
for ((__p) = 0; (__p) < I915_MAX_PIPES; (__p)++) \
|
||||
for_each_if(INTEL_INFO(__dev_priv)->pipe_mask & BIT(__p))
|
||||
|
||||
#define for_each_pipe_masked(__dev_priv, __p, __mask) \
|
||||
for ((__p) = 0; (__p) < INTEL_NUM_PIPES(__dev_priv); (__p)++) \
|
||||
for_each_pipe(__dev_priv, __p) \
|
||||
for_each_if((__mask) & BIT(__p))
|
||||
|
||||
#define for_each_cpu_transcoder_masked(__dev_priv, __t, __mask) \
|
||||
|
|
|
@ -1739,11 +1739,12 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
|
|||
if (pch_iir & SDE_POISON)
|
||||
drm_err(&dev_priv->drm, "PCH poison interrupt\n");
|
||||
|
||||
if (pch_iir & SDE_FDI_MASK)
|
||||
if (pch_iir & SDE_FDI_MASK) {
|
||||
for_each_pipe(dev_priv, pipe)
|
||||
drm_dbg(&dev_priv->drm, " pipe %c FDI IIR: 0x%08x\n",
|
||||
pipe_name(pipe),
|
||||
I915_READ(FDI_RX_IIR(pipe)));
|
||||
}
|
||||
|
||||
if (pch_iir & (SDE_TRANSB_CRC_DONE | SDE_TRANSA_CRC_DONE))
|
||||
drm_dbg(&dev_priv->drm, "PCH transcoder CRC done interrupt\n");
|
||||
|
@ -1823,11 +1824,12 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
|
|||
if (pch_iir & SDE_AUDIO_CP_CHG_CPT)
|
||||
drm_dbg(&dev_priv->drm, "Audio CP change interrupt\n");
|
||||
|
||||
if (pch_iir & SDE_FDI_MASK_CPT)
|
||||
if (pch_iir & SDE_FDI_MASK_CPT) {
|
||||
for_each_pipe(dev_priv, pipe)
|
||||
drm_dbg(&dev_priv->drm, " pipe %c FDI IIR: 0x%08x\n",
|
||||
pipe_name(pipe),
|
||||
I915_READ(FDI_RX_IIR(pipe)));
|
||||
}
|
||||
|
||||
if (pch_iir & SDE_ERROR_CPT)
|
||||
cpt_serr_int_handler(dev_priv);
|
||||
|
|
Loading…
Reference in New Issue