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

Commit 59cd09e1 authored by Jesse Barnes's avatar Jesse Barnes Committed by Keith Packard
Browse files

drm/i915/dp: read more receiver capability bits on hotplug



When a hotplug event is received, we need to check the receiver cap bits
in case they've changed (as they might with a hub or chain config).

Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 7183dc29
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1522,6 +1522,8 @@ intel_dp_link_down(struct intel_dp *intel_dp)
static void
intel_dp_check_link_status(struct intel_dp *intel_dp)
{
	int ret;

	if (!intel_dp->base.base.crtc)
		return;

@@ -1530,6 +1532,15 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
		return;
	}

	/* Try to read receiver status if the link appears to be up */
	ret = intel_dp_aux_native_read(intel_dp,
				       0x000, intel_dp->dpcd,
				       sizeof (intel_dp->dpcd));
	if (ret != sizeof(intel_dp->dpcd)) {
		intel_dp_link_down(intel_dp);
		return;
	}

	if (!intel_channel_eq_ok(intel_dp)) {
		intel_dp_start_link_train(intel_dp);
		intel_dp_complete_link_train(intel_dp);