Skip to content

Commit

Permalink
drm/i915: Populate dig_port->connected() before connector init
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ville Syrjälä committed Mar 7, 2023
1 parent 0eaca1e commit a98ffd6
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions drivers/gpu/drm/i915/display/intel_ddi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit a98ffd6

Please sign in to comment.