Skip to content

Commit

Permalink
drm/i915/dp: read more receiver capability bits on hotplug
Browse files Browse the repository at this point in the history
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: Jesse Barnes <[email protected]>
Reviewed-by: Keith Packard <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
  • Loading branch information
jbarnes993 authored and keith-packard committed Jul 7, 2011
1 parent 7183dc2 commit 59cd09e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand Down

0 comments on commit 59cd09e

Please sign in to comment.