Commit 1034ce70 authored by Shubhangi Shrivastava's avatar Shubhangi Shrivastava Committed by Ander Conselvan de Oliveira

drm/i915: Fixing eDP detection on certain platforms

Since commit 30d9aa42 ("drm/i915: Read sink_count dpcd always"),
the status of a DP connector depends on its sink count value.
However, some eDP panels don't set that value appropriately,
causing them to be reported as disconnected.
Fix this by ignoring sink count for eDP.

v2: Rephrased commit message. (Ander)
    In case of eDP, returning status as connected if DPCD
    read succeeds to avoid any further operations.

Fixes: 30d9aa42 ("drm/i915: Read sink_count dpcd always")
Cc: Ander Conselvan De Oliveira <conselvan2@gmail.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Reported-by: default avatarTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: default avatarSivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: default avatarShubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Tested-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460444034-22320-1-git-send-email-shubhangi.shrivastava@intel.com
parent 0e505a08
...@@ -3776,7 +3776,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) ...@@ -3776,7 +3776,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
* downstream port information. So, an early return here saves * downstream port information. So, an early return here saves
* time from performing other operations which are not required. * time from performing other operations which are not required.
*/ */
if (!intel_dp->sink_count) if (!is_edp(intel_dp) && !intel_dp->sink_count)
return false; return false;
/* Check if the panel supports PSR */ /* Check if the panel supports PSR */
...@@ -4309,6 +4309,9 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp) ...@@ -4309,6 +4309,9 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
if (!intel_dp_get_dpcd(intel_dp)) if (!intel_dp_get_dpcd(intel_dp))
return connector_status_disconnected; return connector_status_disconnected;
if (is_edp(intel_dp))
return connector_status_connected;
/* if there's no downstream port, we're done */ /* if there's no downstream port, we're done */
if (!(dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT)) if (!(dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT))
return connector_status_connected; return connector_status_connected;
......
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