summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2012-09-20 16:42:45 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-09-26 14:26:06 +0200
commitda131a46268bf2a67e7b7fa137a90a1279866367 (patch)
tree950f2e0fac5e23db7f94c2bc1cec059aa88a3114 /drivers/gpu/drm/i915/intel_dp.c
parenta477f4fcbdd48837610974b0d025af1d46051a57 (diff)
downloadblackbird-op-linux-da131a46268bf2a67e7b7fa137a90a1279866367.tar.gz
blackbird-op-linux-da131a46268bf2a67e7b7fa137a90a1279866367.zip
drm/dp: Make sink count DP 1.2 aware
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 4f2a38181491..c63f54e84847 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2101,13 +2101,12 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
/* If we're HPD-aware, SINK_COUNT changes dynamically */
hpd = !!(intel_dp->downstream_ports[0] & DP_DS_PORT_HPD);
if (hpd) {
- uint8_t sink_count;
+ uint8_t reg;
if (!intel_dp_aux_native_read_retry(intel_dp, DP_SINK_COUNT,
- &sink_count, 1))
+ &reg, 1))
return connector_status_unknown;
- sink_count &= DP_SINK_COUNT_MASK;
- return sink_count ? connector_status_connected
- : connector_status_disconnected;
+ return DP_GET_SINK_COUNT(reg) ? connector_status_connected
+ : connector_status_disconnected;
}
/* If no HPD, poke DDC gently */
OpenPOWER on IntegriCloud