Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da131a46 authored by Adam Jackson's avatar Adam Jackson Committed by Daniel Vetter
Browse files

drm/dp: Make sink count DP 1.2 aware

parent a477f4fc
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -2101,12 +2101,11 @@ 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
		return DP_GET_SINK_COUNT(reg) ? connector_status_connected
					      : connector_status_disconnected;
	}

+2 −1
Original line number Diff line number Diff line
@@ -221,7 +221,8 @@
# define DP_PSR_FRAME_CAPTURE		    (1 << 3)

#define DP_SINK_COUNT			    0x200
# define DP_SINK_COUNT_MASK		    (31 << 0)
/* prior to 1.2 bit 7 was reserved mbz */
# define DP_GET_SINK_COUNT(x)		    ((((x) & 0x80) >> 1) | ((x) & 0x3f))
# define DP_SINK_CP_READY		    (1 << 6)

#define DP_DEVICE_SERVICE_IRQ_VECTOR	    0x201