Make DSI initialization similar to other encoders by calling init on each possible port. This takes a step towards being able to have two separate DSI displays, though currently this would likely break if there were two DSI child devices present in the VBT. Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> --- drivers/gpu/drm/i915/display/icl_dsi.c | 7 ++++--- drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++----- drivers/gpu/drm/i915/display/intel_dsi.h | 4 ++-- drivers/gpu/drm/i915/display/vlv_dsi.c | 10 ++++------ 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c index 6e398c33a524..81a3c36679a2 100644 --- a/drivers/gpu/drm/i915/display/icl_dsi.c +++ b/drivers/gpu/drm/i915/display/icl_dsi.c @@ -1543,7 +1543,7 @@ static void icl_dsi_add_properties(struct intel_connector *connector) connector->panel.fixed_mode->vdisplay); } -void icl_dsi_init(struct drm_i915_private *dev_priv) +void icl_dsi_init(struct drm_i915_private *dev_priv, enum port port) { struct drm_device *dev = &dev_priv->drm; struct intel_dsi *intel_dsi; @@ -1551,11 +1551,12 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) struct intel_connector *intel_connector; struct drm_connector *connector; struct drm_display_mode *fixed_mode; - enum port port; - if (!intel_bios_is_dsi_present(dev_priv, &port)) + if (!dev_priv->vbt.ddi_port_info[port].supports_dsi) return; + DRM_DEBUG_KMS("Initializing DSI on port %c\n", port_name(port)); + intel_dsi = kzalloc(sizeof(*intel_dsi), GFP_KERNEL); if (!intel_dsi) return; diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index e56a75c07043..8dd8827a1974 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -15946,13 +15946,15 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) intel_ddi_init(dev_priv, PORT_G); intel_ddi_init(dev_priv, PORT_H); intel_ddi_init(dev_priv, PORT_I); - icl_dsi_init(dev_priv); + icl_dsi_init(dev_priv, PORT_A); + icl_dsi_init(dev_priv, PORT_B); } else if (IS_ELKHARTLAKE(dev_priv)) { intel_ddi_init(dev_priv, PORT_A); intel_ddi_init(dev_priv, PORT_B); intel_ddi_init(dev_priv, PORT_C); intel_ddi_init(dev_priv, PORT_D); - icl_dsi_init(dev_priv); + icl_dsi_init(dev_priv, PORT_A); + icl_dsi_init(dev_priv, PORT_B); } else if (IS_GEN(dev_priv, 11)) { intel_ddi_init(dev_priv, PORT_A); intel_ddi_init(dev_priv, PORT_B); @@ -15968,7 +15970,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) intel_bios_is_port_present(dev_priv, PORT_F)) intel_ddi_init(dev_priv, PORT_F); - icl_dsi_init(dev_priv); + icl_dsi_init(dev_priv, PORT_A); + icl_dsi_init(dev_priv, PORT_B); } else if (IS_GEN9_LP(dev_priv)) { /* * FIXME: Broxton doesn't support port detection via the @@ -15979,7 +15982,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) intel_ddi_init(dev_priv, PORT_B); intel_ddi_init(dev_priv, PORT_C); - vlv_dsi_init(dev_priv); + vlv_dsi_init(dev_priv, PORT_A); + vlv_dsi_init(dev_priv, PORT_C); } else if (HAS_DDI(dev_priv)) { int found; @@ -16098,7 +16102,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) intel_hdmi_init(dev_priv, CHV_HDMID, PORT_D); } - vlv_dsi_init(dev_priv); + vlv_dsi_init(dev_priv, PORT_A); + vlv_dsi_init(dev_priv, PORT_C); } else if (IS_PINEVIEW(dev_priv)) { intel_lvds_init(dev_priv); intel_crt_init(dev_priv); diff --git a/drivers/gpu/drm/i915/display/intel_dsi.h b/drivers/gpu/drm/i915/display/intel_dsi.h index b15be5814599..c2f4476e03a5 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi.h +++ b/drivers/gpu/drm/i915/display/intel_dsi.h @@ -162,7 +162,7 @@ static inline u16 intel_dsi_encoder_ports(struct intel_encoder *encoder) } /* icl_dsi.c */ -void icl_dsi_init(struct drm_i915_private *dev_priv); +void icl_dsi_init(struct drm_i915_private *dev_priv, enum port port); /* intel_dsi.c */ int intel_dsi_bitrate(const struct intel_dsi *intel_dsi); @@ -179,7 +179,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector, struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi, const struct mipi_dsi_host_ops *funcs, enum port port); -void vlv_dsi_init(struct drm_i915_private *dev_priv); +void vlv_dsi_init(struct drm_i915_private *dev_priv, enum port port); /* vlv_dsi_pll.c */ int vlv_dsi_pll_compute(struct intel_encoder *encoder, diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index 50064cde0724..293c70e36194 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -1809,7 +1809,7 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi) intel_dsi_log_params(intel_dsi); } -void vlv_dsi_init(struct drm_i915_private *dev_priv) +void vlv_dsi_init(struct drm_i915_private *dev_priv, enum port port) { struct drm_device *dev = &dev_priv->drm; struct intel_dsi *intel_dsi; @@ -1818,14 +1818,12 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) struct intel_connector *intel_connector; struct drm_connector *connector; struct drm_display_mode *current_mode, *fixed_mode; - enum port port; - - DRM_DEBUG_KMS("\n"); - /* There is no detection method for MIPI so rely on VBT */ - if (!intel_bios_is_dsi_present(dev_priv, &port)) + if (!dev_priv->vbt.ddi_port_info[port].supports_dsi) return; + DRM_DEBUG_KMS("Initializing DSI on port %c\n", port_name(port)); + if (IS_GEN9_LP(dev_priv)) dev_priv->mipi_mmio_base = BXT_MIPI_BASE; else -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx