mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 13:57:54 -04:00
drm/i915: Populate dig_port->connected() before connector init
We'll need dig_port->connected() to be there for a HPD live state check during eDP connector probing. Reorder intel_ddi_init() accordingly. g4x_dp_init() is already fine. v2: Fix comment style while at it Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230302161013.29213-2-ville.syrjala@linux.intel.com
This commit is contained in:
@@ -4505,23 +4505,6 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
|
||||
drm_WARN_ON(&dev_priv->drm, port > PORT_I);
|
||||
dig_port->ddi_io_power_domain = intel_display_power_ddi_io_domain(dev_priv, port);
|
||||
|
||||
if (init_dp) {
|
||||
if (!intel_ddi_init_dp_connector(dig_port))
|
||||
goto err;
|
||||
|
||||
dig_port->hpd_pulse = intel_dp_hpd_pulse;
|
||||
|
||||
if (dig_port->dp.mso_link_count)
|
||||
encoder->pipe_mask = intel_ddi_splitter_pipe_mask(dev_priv);
|
||||
}
|
||||
|
||||
/* In theory we don't need the encoder->type check, but leave it just in
|
||||
* case we have some really bad VBTs... */
|
||||
if (encoder->type != INTEL_OUTPUT_EDP && init_hdmi) {
|
||||
if (!intel_ddi_init_hdmi_connector(dig_port))
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (DISPLAY_VER(dev_priv) >= 11) {
|
||||
if (intel_phy_is_tc(dev_priv, phy))
|
||||
dig_port->connected = intel_tc_port_connected;
|
||||
@@ -4542,6 +4525,25 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
|
||||
|
||||
intel_infoframe_init(dig_port);
|
||||
|
||||
if (init_dp) {
|
||||
if (!intel_ddi_init_dp_connector(dig_port))
|
||||
goto err;
|
||||
|
||||
dig_port->hpd_pulse = intel_dp_hpd_pulse;
|
||||
|
||||
if (dig_port->dp.mso_link_count)
|
||||
encoder->pipe_mask = intel_ddi_splitter_pipe_mask(dev_priv);
|
||||
}
|
||||
|
||||
/*
|
||||
* In theory we don't need the encoder->type check,
|
||||
* but leave it just in case we have some really bad VBTs...
|
||||
*/
|
||||
if (encoder->type != INTEL_OUTPUT_EDP && init_hdmi) {
|
||||
if (!intel_ddi_init_hdmi_connector(dig_port))
|
||||
goto err;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
err:
|
||||
|
||||
Reference in New Issue
Block a user