aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c9
-rw-r--r--include/drm/drm_dp_helper.h3
2 files changed, 6 insertions, 6 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)
2101 /* If we're HPD-aware, SINK_COUNT changes dynamically */ 2101 /* If we're HPD-aware, SINK_COUNT changes dynamically */
2102 hpd = !!(intel_dp->downstream_ports[0] & DP_DS_PORT_HPD); 2102 hpd = !!(intel_dp->downstream_ports[0] & DP_DS_PORT_HPD);
2103 if (hpd) { 2103 if (hpd) {
2104 uint8_t sink_count; 2104 uint8_t reg;
2105 if (!intel_dp_aux_native_read_retry(intel_dp, DP_SINK_COUNT, 2105 if (!intel_dp_aux_native_read_retry(intel_dp, DP_SINK_COUNT,
2106 &sink_count, 1)) 2106 &reg, 1))
2107 return connector_status_unknown; 2107 return connector_status_unknown;
2108 sink_count &= DP_SINK_COUNT_MASK; 2108 return DP_GET_SINK_COUNT(reg) ? connector_status_connected
2109 return sink_count ? connector_status_connected 2109 : connector_status_disconnected;
2110 : connector_status_disconnected;
2111 } 2110 }
2112 2111
2113 /* If no HPD, poke DDC gently */ 2112 /* If no HPD, poke DDC gently */
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 38ffcb4332aa..fe061489f91f 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -221,7 +221,8 @@
221# define DP_PSR_FRAME_CAPTURE (1 << 3) 221# define DP_PSR_FRAME_CAPTURE (1 << 3)
222 222
223#define DP_SINK_COUNT 0x200 223#define DP_SINK_COUNT 0x200
224# define DP_SINK_COUNT_MASK (31 << 0) 224/* prior to 1.2 bit 7 was reserved mbz */
225# define DP_GET_SINK_COUNT(x) ((((x) & 0x80) >> 1) | ((x) & 0x3f))
225# define DP_SINK_CP_READY (1 << 6) 226# define DP_SINK_CP_READY (1 << 6)
226 227
227#define DP_DEVICE_SERVICE_IRQ_VECTOR 0x201 228#define DP_DEVICE_SERVICE_IRQ_VECTOR 0x201