Commit d5acd97f authored by Dhinakaran Pandiyan's avatar Dhinakaran Pandiyan

drm/i915/dp: Use a local variable for intel_encoder *

We have two cases of intel_dp to intel_encoder conversions, use a
local variable to store the conversion.
Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-3-dhinakaran.pandiyan@intel.com
parent f24f6eb9
...@@ -5017,6 +5017,7 @@ intel_dp_long_pulse(struct intel_connector *connector, ...@@ -5017,6 +5017,7 @@ intel_dp_long_pulse(struct intel_connector *connector,
{ {
struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
struct intel_dp *intel_dp = intel_attached_dp(&connector->base); struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
enum drm_connector_status status; enum drm_connector_status status;
u8 sink_irq_vector = 0; u8 sink_irq_vector = 0;
...@@ -5027,7 +5028,7 @@ intel_dp_long_pulse(struct intel_connector *connector, ...@@ -5027,7 +5028,7 @@ intel_dp_long_pulse(struct intel_connector *connector,
/* Can't disconnect eDP */ /* Can't disconnect eDP */
if (intel_dp_is_edp(intel_dp)) if (intel_dp_is_edp(intel_dp))
status = edp_detect(intel_dp); status = edp_detect(intel_dp);
else if (intel_digital_port_connected(&dp_to_dig_port(intel_dp)->base)) else if (intel_digital_port_connected(encoder))
status = intel_dp_detect_dpcd(intel_dp); status = intel_dp_detect_dpcd(intel_dp);
else else
status = connector_status_disconnected; status = connector_status_disconnected;
...@@ -5078,11 +5079,8 @@ intel_dp_long_pulse(struct intel_connector *connector, ...@@ -5078,11 +5079,8 @@ intel_dp_long_pulse(struct intel_connector *connector,
* Some external monitors do not signal loss of link synchronization * Some external monitors do not signal loss of link synchronization
* with an IRQ_HPD, so force a link status check. * with an IRQ_HPD, so force a link status check.
*/ */
if (!intel_dp_is_edp(intel_dp)) { if (!intel_dp_is_edp(intel_dp))
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
intel_dp_retrain_link(encoder, ctx); intel_dp_retrain_link(encoder, ctx);
}
/* /*
* Clearing NACK and defer counts to get their exact values * Clearing NACK and defer counts to get their exact values
......
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