Skip to content

Commit

Permalink
drm/i915: Re-apply "Perform link quality check, unconditionally durin…
Browse files Browse the repository at this point in the history
…g long pulse"

This re-applies the workaround for "some DP sinks, [which] are a
little nuts" from commit 1a36147 ("drm/i915: Perform link
quality check unconditionally during long pulse").
It makes the secondary AOC E2460P monitor connected via DP to an
acer Veriton N4640G usable again.

This hunk was dropped in commit c85d200 ("drm/i915: Move SST
DP link retraining into the ->post_hotplug() hook")

Fixes: c85d200 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook")
[Cleaned up commit message, added stable cc]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
Cc: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180825191035.3945-1-lyude@redhat.com
  • Loading branch information
Jan-Marek Glogowski authored and Lyude Paul committed Aug 25, 2018
1 parent f7480b2 commit 3cf71bc
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4333,18 +4333,6 @@ intel_dp_needs_link_retrain(struct intel_dp *intel_dp)
return !drm_dp_channel_eq_ok(link_status, intel_dp->lane_count);
}

/*
* If display is now connected check links status,
* there has been known issues of link loss triggering
* long pulse.
*
* Some sinks (eg. ASUS PB287Q) seem to perform some
* weird HPD ping pong during modesets. So we can apparently
* end up with HPD going low during a modeset, and then
* going back up soon after. And once that happens we must
* retrain the link to get a picture. That's in case no
* userspace component reacted to intermittent HPD dip.
*/
int intel_dp_retrain_link(struct intel_encoder *encoder,
struct drm_modeset_acquire_ctx *ctx)
{
Expand Down Expand Up @@ -5031,7 +5019,8 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
}

static int
intel_dp_long_pulse(struct intel_connector *connector)
intel_dp_long_pulse(struct intel_connector *connector,
struct drm_modeset_acquire_ctx *ctx)
{
struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
Expand Down Expand Up @@ -5090,6 +5079,22 @@ intel_dp_long_pulse(struct intel_connector *connector)
*/
status = connector_status_disconnected;
goto out;
} else {
/*
* If display is now connected check links status,
* there has been known issues of link loss triggering
* long pulse.
*
* Some sinks (eg. ASUS PB287Q) seem to perform some
* weird HPD ping pong during modesets. So we can apparently
* end up with HPD going low during a modeset, and then
* going back up soon after. And once that happens we must
* retrain the link to get a picture. That's in case no
* userspace component reacted to intermittent HPD dip.
*/
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;

intel_dp_retrain_link(encoder, ctx);
}

/*
Expand Down Expand Up @@ -5151,7 +5156,7 @@ intel_dp_detect(struct drm_connector *connector,
return ret;
}

status = intel_dp_long_pulse(intel_dp->attached_connector);
status = intel_dp_long_pulse(intel_dp->attached_connector, ctx);
}

intel_dp->detect_done = false;
Expand Down

0 comments on commit 3cf71bc

Please sign in to comment.