Commit 10158116 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Jani Nikula

drm/i915: Move long hpd handling into the hotplug work

We can't rely on connector->status in the detect() hook if the long hpd
was already handled by the dig_port_work as that won't update
connector->status. Thus we have to defer the long hpd handling entirely
until the hotplug work runs to avoid the double long hpd handling
the "detect_done" flag is trying to prevent.

We'll start to depend on connector->status being up to date in a
following patch.

Cc: Damien Cassou <damien@cassou.me>
Cc: freedesktop.org@gp.mailgun.org
Cc: Arno <blouin.arno@gmail.com>
Cc: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Cc: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Cc: stable@vger.kernel.org
Tested-by: default avatarArno <blouin.arno@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83348Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1475481316-8194-1-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
(cherry picked from commit 27d4efc5)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent c79d7303
...@@ -4831,16 +4831,14 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) ...@@ -4831,16 +4831,14 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
port_name(intel_dig_port->port), port_name(intel_dig_port->port),
long_hpd ? "long" : "short"); long_hpd ? "long" : "short");
if (long_hpd) {
intel_dp->detect_done = false;
return IRQ_NONE;
}
power_domain = intel_display_port_aux_power_domain(intel_encoder); power_domain = intel_display_port_aux_power_domain(intel_encoder);
intel_display_power_get(dev_priv, power_domain); intel_display_power_get(dev_priv, power_domain);
if (long_hpd) {
intel_dp_long_pulse(intel_dp->attached_connector);
if (intel_dp->is_mst)
ret = IRQ_HANDLED;
goto put_power;
} else {
if (intel_dp->is_mst) { if (intel_dp->is_mst) {
if (intel_dp_check_mst_status(intel_dp) == -EINVAL) { if (intel_dp_check_mst_status(intel_dp) == -EINVAL) {
/* /*
...@@ -4852,17 +4850,17 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) ...@@ -4852,17 +4850,17 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
intel_dp->is_mst = false; intel_dp->is_mst = false;
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
intel_dp->is_mst); intel_dp->is_mst);
intel_dp->detect_done = false;
goto put_power; goto put_power;
} }
} }
if (!intel_dp->is_mst) { if (!intel_dp->is_mst) {
if (!intel_dp_short_pulse(intel_dp)) { if (!intel_dp_short_pulse(intel_dp)) {
intel_dp_long_pulse(intel_dp->attached_connector); intel_dp->detect_done = false;
goto put_power; goto put_power;
} }
} }
}
ret = IRQ_HANDLED; ret = IRQ_HANDLED;
......
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