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

Commit e8519464 authored by Adam Jackson's avatar Adam Jackson Committed by Keith Packard
Browse files

drm/i915/dp: Don't turn CPT DP ports on too early



The docs say the port has to come on in training pattern 1; at this
point, though, ->DP is in normal mode.  The intent here is to wait
until the port is in fact sending data, but that doesn't happen since
we've broken the sequence the hardware expects, and the vblank wait will
time out and kvetch in the log.

Signed-off-by: default avatarAdam Jackson <ajax@redhat.com>
Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 81055854
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1334,10 +1334,16 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
	u32 reg;
	uint32_t DP = intel_dp->DP;

	/* Enable output, wait for it to become active */
	/*
	 * On CPT we have to enable the port in training pattern 1, which
	 * will happen below in intel_dp_set_link_train.  Otherwise, enable
	 * the port and wait for it to become active.
	 */
	if (!HAS_PCH_CPT(dev)) {
		I915_WRITE(intel_dp->output_reg, intel_dp->DP);
		POSTING_READ(intel_dp->output_reg);
		intel_wait_for_vblank(dev, intel_crtc->pipe);
	}

	/* Write the link configuration data */
	intel_dp_aux_native_write(intel_dp, DP_LINK_BW_SET,