Commit c9ff160b authored by Jani Nikula's avatar Jani Nikula Committed by Dave Airlie

drm/i915/dp: downstream port capabilities are not present in DPCD 1.0

We haven't read the downstream port caps for DPCD 1.0, so don't use
them.

v2: use defines for DPCD 1.0 downstream port types
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 3d2e423e
...@@ -2810,7 +2810,6 @@ static enum drm_connector_status ...@@ -2810,7 +2810,6 @@ static enum drm_connector_status
intel_dp_detect_dpcd(struct intel_dp *intel_dp) intel_dp_detect_dpcd(struct intel_dp *intel_dp)
{ {
uint8_t *dpcd = intel_dp->dpcd; uint8_t *dpcd = intel_dp->dpcd;
bool hpd;
uint8_t type; uint8_t type;
if (!intel_dp_get_dpcd(intel_dp)) if (!intel_dp_get_dpcd(intel_dp))
...@@ -2821,8 +2820,8 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp) ...@@ -2821,8 +2820,8 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
return connector_status_connected; return connector_status_connected;
/* If we're HPD-aware, SINK_COUNT changes dynamically */ /* If we're HPD-aware, SINK_COUNT changes dynamically */
hpd = !!(intel_dp->downstream_ports[0] & DP_DS_PORT_HPD); if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
if (hpd) { intel_dp->downstream_ports[0] & DP_DS_PORT_HPD) {
uint8_t reg; uint8_t reg;
if (!intel_dp_aux_native_read_retry(intel_dp, DP_SINK_COUNT, if (!intel_dp_aux_native_read_retry(intel_dp, DP_SINK_COUNT,
&reg, 1)) &reg, 1))
...@@ -2836,9 +2835,18 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp) ...@@ -2836,9 +2835,18 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
return connector_status_connected; return connector_status_connected;
/* Well we tried, say unknown for unreliable port types */ /* Well we tried, say unknown for unreliable port types */
type = intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK; if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11) {
if (type == DP_DS_PORT_TYPE_VGA || type == DP_DS_PORT_TYPE_NON_EDID) type = intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK;
return connector_status_unknown; if (type == DP_DS_PORT_TYPE_VGA ||
type == DP_DS_PORT_TYPE_NON_EDID)
return connector_status_unknown;
} else {
type = intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] &
DP_DWN_STRM_PORT_TYPE_MASK;
if (type == DP_DWN_STRM_PORT_TYPE_ANALOG ||
type == DP_DWN_STRM_PORT_TYPE_OTHER)
return connector_status_unknown;
}
/* Anything else is out of spec, warn and ignore */ /* Anything else is out of spec, warn and ignore */
DRM_DEBUG_KMS("Broken DP branch device, ignoring\n"); DRM_DEBUG_KMS("Broken DP branch device, ignoring\n");
......
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