aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2013-09-27 07:48:42 -0400
committerDave Airlie <airlied@redhat.com>2013-09-30 20:30:58 -0400
commitc9ff160b169b4db1e562001f08add446c1f469c7 (patch)
treead8b65a366cc0ada9f12629d66c85e9da09c964b
parent3d2e423e0f0f0a3de504a6acae858c651599ba25 (diff)
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: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 60d2006fe15d..605908df95d8 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2810,7 +2810,6 @@ static enum drm_connector_status
2810intel_dp_detect_dpcd(struct intel_dp *intel_dp) 2810intel_dp_detect_dpcd(struct intel_dp *intel_dp)
2811{ 2811{
2812 uint8_t *dpcd = intel_dp->dpcd; 2812 uint8_t *dpcd = intel_dp->dpcd;
2813 bool hpd;
2814 uint8_t type; 2813 uint8_t type;
2815 2814
2816 if (!intel_dp_get_dpcd(intel_dp)) 2815 if (!intel_dp_get_dpcd(intel_dp))
@@ -2821,8 +2820,8 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
2821 return connector_status_connected; 2820 return connector_status_connected;
2822 2821
2823 /* If we're HPD-aware, SINK_COUNT changes dynamically */ 2822 /* If we're HPD-aware, SINK_COUNT changes dynamically */
2824 hpd = !!(intel_dp->downstream_ports[0] & DP_DS_PORT_HPD); 2823 if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
2825 if (hpd) { 2824 intel_dp->downstream_ports[0] & DP_DS_PORT_HPD) {
2826 uint8_t reg; 2825 uint8_t reg;
2827 if (!intel_dp_aux_native_read_retry(intel_dp, DP_SINK_COUNT, 2826 if (!intel_dp_aux_native_read_retry(intel_dp, DP_SINK_COUNT,
2828 &reg, 1)) 2827 &reg, 1))
@@ -2836,9 +2835,18 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
2836 return connector_status_connected; 2835 return connector_status_connected;
2837 2836
2838 /* Well we tried, say unknown for unreliable port types */ 2837 /* Well we tried, say unknown for unreliable port types */
2839 type = intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK; 2838 if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11) {
2840 if (type == DP_DS_PORT_TYPE_VGA || type == DP_DS_PORT_TYPE_NON_EDID) 2839 type = intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK;
2841 return connector_status_unknown; 2840 if (type == DP_DS_PORT_TYPE_VGA ||
2841 type == DP_DS_PORT_TYPE_NON_EDID)
2842 return connector_status_unknown;
2843 } else {
2844 type = intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] &
2845 DP_DWN_STRM_PORT_TYPE_MASK;
2846 if (type == DP_DWN_STRM_PORT_TYPE_ANALOG ||
2847 type == DP_DWN_STRM_PORT_TYPE_OTHER)
2848 return connector_status_unknown;
2849 }
2842 2850
2843 /* Anything else is out of spec, warn and ignore */ 2851 /* Anything else is out of spec, warn and ignore */
2844 DRM_DEBUG_KMS("Broken DP branch device, ignoring\n"); 2852 DRM_DEBUG_KMS("Broken DP branch device, ignoring\n");