Commit 47658556 authored by Dhinakaran Pandiyan's avatar Dhinakaran Pandiyan

drm/i915/dp: Do not grab crtc modeset lock in intel_dp_detect()

A crtc modeset lock was added for link retraining but
intel_dp_retrain_link() knows to take the necessary locks since
commit c85d200e ("drm/i915: Move SST DP link retraining into the
->post_hotplug() hook")
v2: Drop AUX power domain reference in the early return path

Fixes: c85d200e ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-4-dhinakaran.pandiyan@intel.com
parent d5acd97f
...@@ -5079,8 +5079,16 @@ intel_dp_long_pulse(struct intel_connector *connector, ...@@ -5079,8 +5079,16 @@ 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)) {
intel_dp_retrain_link(encoder, ctx); int ret;
ret = intel_dp_retrain_link(encoder, ctx);
if (ret) {
intel_display_power_put(dev_priv,
intel_dp->aux_power_domain);
return ret;
}
}
/* /*
* Clearing NACK and defer counts to get their exact values * Clearing NACK and defer counts to get their exact values
...@@ -5130,19 +5138,8 @@ intel_dp_detect(struct drm_connector *connector, ...@@ -5130,19 +5138,8 @@ intel_dp_detect(struct drm_connector *connector,
connector->base.id, connector->name); connector->base.id, connector->name);
/* If full detect is not performed yet, do a full detect */ /* If full detect is not performed yet, do a full detect */
if (!intel_dp->detect_done) { if (!intel_dp->detect_done)
struct drm_crtc *crtc;
int ret;
crtc = connector->state->crtc;
if (crtc) {
ret = drm_modeset_lock(&crtc->mutex, ctx);
if (ret)
return ret;
}
status = intel_dp_long_pulse(intel_dp->attached_connector, ctx); status = intel_dp_long_pulse(intel_dp->attached_connector, ctx);
}
intel_dp->detect_done = false; intel_dp->detect_done = false;
......
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