Commit 03c7e4f1 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Move hpd_pin setup to encoder init

Currently DP/HDMI/DDI encoders init their hpd_pin from the
connector init. Let's move it to the encoder init so that
we don't need to add platform specific junk to the connector
init (which is shared by all g4x+ platforms).
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-10-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent 815f4ef2
...@@ -5050,6 +5050,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) ...@@ -5050,6 +5050,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
encoder->port = port; encoder->port = port;
encoder->cloneable = 0; encoder->cloneable = 0;
encoder->pipe_mask = ~0; encoder->pipe_mask = ~0;
encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
if (INTEL_GEN(dev_priv) >= 11) if (INTEL_GEN(dev_priv) >= 11)
dig_port->saved_port_bits = dig_port->saved_port_bits =
......
...@@ -7601,7 +7601,6 @@ intel_dp_init_connector(struct intel_digital_port *dig_port, ...@@ -7601,7 +7601,6 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
if (INTEL_GEN(dev_priv) >= 11) if (INTEL_GEN(dev_priv) >= 11)
connector->ycbcr_420_allowed = true; connector->ycbcr_420_allowed = true;
intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
intel_connector->polled = DRM_CONNECTOR_POLL_HPD; intel_connector->polled = DRM_CONNECTOR_POLL_HPD;
intel_dp_aux_init(intel_dp); intel_dp_aux_init(intel_dp);
...@@ -7746,6 +7745,7 @@ bool intel_dp_init(struct drm_i915_private *dev_priv, ...@@ -7746,6 +7745,7 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
} }
intel_encoder->cloneable = 0; intel_encoder->cloneable = 0;
intel_encoder->port = port; intel_encoder->port = port;
intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
dig_port->hpd_pulse = intel_dp_hpd_pulse; dig_port->hpd_pulse = intel_dp_hpd_pulse;
......
...@@ -3259,7 +3259,6 @@ void intel_hdmi_init_connector(struct intel_digital_port *dig_port, ...@@ -3259,7 +3259,6 @@ void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
connector->ycbcr_420_allowed = true; connector->ycbcr_420_allowed = true;
intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
intel_connector->polled = DRM_CONNECTOR_POLL_HPD; intel_connector->polled = DRM_CONNECTOR_POLL_HPD;
if (HAS_DDI(dev_priv)) if (HAS_DDI(dev_priv))
...@@ -3393,6 +3392,7 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv, ...@@ -3393,6 +3392,7 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv,
intel_encoder->pipe_mask = ~0; intel_encoder->pipe_mask = ~0;
} }
intel_encoder->cloneable = 1 << INTEL_OUTPUT_ANALOG; intel_encoder->cloneable = 1 << INTEL_OUTPUT_ANALOG;
intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
/* /*
* BSpec is unclear about HDMI+HDMI cloning on g4x, but it seems * BSpec is unclear about HDMI+HDMI cloning on g4x, but it seems
* to work on real hardware. And since g4x can send infoframes to * to work on real hardware. And since g4x can send infoframes to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment