Commit 44e58783 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Greg Kroah-Hartman

drm/i915: Allow DP to work w/o EDID

commit 16c83fad upstream.

Allow returning "connected" or "unknown" connector status for DP branch
devices that don't have an EDID. Currently we'd claim the thing as
"disconnected" if there is no EDID.

This stuff used to broken already, I think, but it got more broken by
commit f21a2198 ("drm/i915: Splitting intel_dp_detect")

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>
Tested-by: default avatarArno <blouin.arno@gmail.com>
Fixes: f21a2198 ("drm/i915: Splitting intel_dp_detect")
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-2-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
(cherry picked from commit 5cb651a7)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d9050ef
...@@ -4207,7 +4207,7 @@ intel_dp_unset_edid(struct intel_dp *intel_dp) ...@@ -4207,7 +4207,7 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
intel_dp->has_audio = false; intel_dp->has_audio = false;
} }
static void static enum drm_connector_status
intel_dp_long_pulse(struct intel_connector *intel_connector) intel_dp_long_pulse(struct intel_connector *intel_connector)
{ {
struct drm_connector *connector = &intel_connector->base; struct drm_connector *connector = &intel_connector->base;
...@@ -4232,7 +4232,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) ...@@ -4232,7 +4232,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
else else
status = connector_status_disconnected; status = connector_status_disconnected;
if (status != connector_status_connected) { if (status == connector_status_disconnected) {
intel_dp->compliance_test_active = 0; intel_dp->compliance_test_active = 0;
intel_dp->compliance_test_type = 0; intel_dp->compliance_test_type = 0;
intel_dp->compliance_test_data = 0; intel_dp->compliance_test_data = 0;
...@@ -4284,8 +4284,8 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) ...@@ -4284,8 +4284,8 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
intel_dp->aux.i2c_defer_count = 0; intel_dp->aux.i2c_defer_count = 0;
intel_dp_set_edid(intel_dp); intel_dp_set_edid(intel_dp);
if (is_edp(intel_dp) || intel_connector->detect_edid)
status = connector_status_connected; status = connector_status_connected;
intel_dp->detect_done = true; intel_dp->detect_done = true;
/* Try to read the source of the interrupt */ /* Try to read the source of the interrupt */
...@@ -4303,12 +4303,11 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) ...@@ -4303,12 +4303,11 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
} }
out: out:
if ((status != connector_status_connected) && if (status != connector_status_connected && !intel_dp->is_mst)
(intel_dp->is_mst == false))
intel_dp_unset_edid(intel_dp); intel_dp_unset_edid(intel_dp);
intel_display_power_put(to_i915(dev), power_domain); intel_display_power_put(to_i915(dev), power_domain);
return; return status;
} }
static enum drm_connector_status static enum drm_connector_status
...@@ -4317,7 +4316,7 @@ intel_dp_detect(struct drm_connector *connector, bool force) ...@@ -4317,7 +4316,7 @@ intel_dp_detect(struct drm_connector *connector, bool force)
struct intel_dp *intel_dp = intel_attached_dp(connector); struct intel_dp *intel_dp = intel_attached_dp(connector);
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *intel_encoder = &intel_dig_port->base; struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct intel_connector *intel_connector = to_intel_connector(connector); enum drm_connector_status status = connector->status;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, connector->name); connector->base.id, connector->name);
...@@ -4332,14 +4331,11 @@ intel_dp_detect(struct drm_connector *connector, bool force) ...@@ -4332,14 +4331,11 @@ intel_dp_detect(struct drm_connector *connector, bool force)
/* 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)
intel_dp_long_pulse(intel_dp->attached_connector); status = intel_dp_long_pulse(intel_dp->attached_connector);
intel_dp->detect_done = false; intel_dp->detect_done = false;
if (is_edp(intel_dp) || intel_connector->detect_edid) return status;
return connector_status_connected;
else
return connector_status_disconnected;
} }
static void static void
......
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