@@ -3751,6 +3751,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
struct intel_encoder *intel_encoder;
struct drm_encoder *encoder;
bool init_hdmi, init_dp, init_lspcon = false;
+ u8 i;
init_hdmi = (dev_priv->vbt.ddi_port_info[port].supports_dvi ||
@@ -3801,8 +3802,9 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
intel_encoder->type = INTEL_OUTPUT_DDI;
intel_encoder->power_domain = intel_port_to_power_domain(port);
intel_encoder->port = port;
- intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
intel_encoder->cloneable = 0;
+ for_each_pipe(dev_priv, i)
+ intel_encoder->crtc_mask |= (1 << i);
if (INTEL_GEN(dev_priv) >= 11)
intel_dig_port->saved_port_bits = I915_READ(DDI_BUF_CTL(port)) &
@@ -6709,7 +6709,10 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
else
intel_encoder->crtc_mask = (1 << 0) | (1 << 1);
} else {
- intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
+ u8 i;
+
+ for_each_pipe(dev_priv, i)
+ intel_encoder->crtc_mask |= (1 << i);
}
intel_encoder->cloneable = 0;
intel_encoder->port = port;
@@ -2468,7 +2468,10 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv,
else
intel_encoder->crtc_mask = (1 << 0) | (1 << 1);
} else {
- intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
+ u8 i;
+
+ for_each_pipe(dev_priv, i)
+ intel_encoder->crtc_mask |= (1 << i);
}
intel_encoder->cloneable = 1 << INTEL_OUTPUT_ANALOG;
/*
This cleanup patch makes changes to use for_each_pipe loop during bit-mask assignment of allowed crtc with encoder. Cc: Jani Nikula <jani.nikula@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Mahesh Kumar <mahesh1.sh.kumar@gmail.com> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com> --- drivers/gpu/drm/i915/intel_ddi.c | 4 +++- drivers/gpu/drm/i915/intel_dp.c | 5 ++++- drivers/gpu/drm/i915/intel_hdmi.c | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-)