aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-08-25 15:10:35 -0400
committerRodrigo Vivi <rodrigo.vivi@intel.com>2018-09-04 00:31:28 -0400
commit399334708b4f07b107094e5db4a390f0f25d2d4f (patch)
tree830aa3a4e777e284bd5f555700fa30a5387499ac
parentf518cd94ecdce3298c9bace261475b6342a0111d (diff)
drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"
This re-applies the workaround for "some DP sinks, [which] are a little nuts" from commit 1a36147bb939 ("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 c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook") Fixes: c85d200e8321 ("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 (cherry picked from commit 3cf71bc9904d7ee4a25a822c5dcb54c7804ea388) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index cd0f649b57a5..1193202766a2 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4160,18 +4160,6 @@ intel_dp_needs_link_retrain(struct intel_dp *intel_dp)
4160 return !drm_dp_channel_eq_ok(link_status, intel_dp->lane_count); 4160 return !drm_dp_channel_eq_ok(link_status, intel_dp->lane_count);
4161} 4161}
4162 4162
4163/*
4164 * If display is now connected check links status,
4165 * there has been known issues of link loss triggering
4166 * long pulse.
4167 *
4168 * Some sinks (eg. ASUS PB287Q) seem to perform some
4169 * weird HPD ping pong during modesets. So we can apparently
4170 * end up with HPD going low during a modeset, and then
4171 * going back up soon after. And once that happens we must
4172 * retrain the link to get a picture. That's in case no
4173 * userspace component reacted to intermittent HPD dip.
4174 */
4175int intel_dp_retrain_link(struct intel_encoder *encoder, 4163int intel_dp_retrain_link(struct intel_encoder *encoder,
4176 struct drm_modeset_acquire_ctx *ctx) 4164 struct drm_modeset_acquire_ctx *ctx)
4177{ 4165{
@@ -4661,7 +4649,8 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
4661} 4649}
4662 4650
4663static int 4651static int
4664intel_dp_long_pulse(struct intel_connector *connector) 4652intel_dp_long_pulse(struct intel_connector *connector,
4653 struct drm_modeset_acquire_ctx *ctx)
4665{ 4654{
4666 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); 4655 struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
4667 struct intel_dp *intel_dp = intel_attached_dp(&connector->base); 4656 struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
@@ -4720,6 +4709,22 @@ intel_dp_long_pulse(struct intel_connector *connector)
4720 */ 4709 */
4721 status = connector_status_disconnected; 4710 status = connector_status_disconnected;
4722 goto out; 4711 goto out;
4712 } else {
4713 /*
4714 * If display is now connected check links status,
4715 * there has been known issues of link loss triggering
4716 * long pulse.
4717 *
4718 * Some sinks (eg. ASUS PB287Q) seem to perform some
4719 * weird HPD ping pong during modesets. So we can apparently
4720 * end up with HPD going low during a modeset, and then
4721 * going back up soon after. And once that happens we must
4722 * retrain the link to get a picture. That's in case no
4723 * userspace component reacted to intermittent HPD dip.
4724 */
4725 struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
4726
4727 intel_dp_retrain_link(encoder, ctx);
4723 } 4728 }
4724 4729
4725 /* 4730 /*
@@ -4781,7 +4786,7 @@ intel_dp_detect(struct drm_connector *connector,
4781 return ret; 4786 return ret;
4782 } 4787 }
4783 4788
4784 status = intel_dp_long_pulse(intel_dp->attached_connector); 4789 status = intel_dp_long_pulse(intel_dp->attached_connector, ctx);
4785 } 4790 }
4786 4791
4787 intel_dp->detect_done = false; 4792 intel_dp->detect_done = false;