From 0c56567eff54fd668c928a071a8b8f8136470465 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Tue, 23 Oct 2018 03:25:11 -0700 Subject: [PATCH] Add i915 eDP fixes --- ...ining-comment-in-intel_dp_long_pulse.patch | 60 +++++++++++++++++++ ...rain-workaround-to-external-monitors.patch | 55 +++++++++++++++++ kernel.spec | 7 +++ 3 files changed, 122 insertions(+) create mode 100644 CI-1-6-drm-i915-dp-Fix-link-retraining-comment-in-intel_dp_long_pulse.patch create mode 100644 CI-2-6-drm-i915-dp-Restrict-link-retrain-workaround-to-external-monitors.patch diff --git a/CI-1-6-drm-i915-dp-Fix-link-retraining-comment-in-intel_dp_long_pulse.patch b/CI-1-6-drm-i915-dp-Fix-link-retraining-comment-in-intel_dp_long_pulse.patch new file mode 100644 index 000000000..2888fb6de --- /dev/null +++ b/CI-1-6-drm-i915-dp-Fix-link-retraining-comment-in-intel_dp_long_pulse.patch @@ -0,0 +1,60 @@ +From patchwork Thu Sep 27 20:57:30 2018 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: [CI, 1/6] drm/i915/dp: Fix link retraining comment in + intel_dp_long_pulse() +From: Dhinakaran Pandiyan +X-Patchwork-Id: 253516 +Message-Id: <20180927205735.16651-1-dhinakaran.pandiyan@intel.com> +To: intel-gfx@lists.freedesktop.org +Date: Thu, 27 Sep 2018 13:57:30 -0700 + +Comment claims link needs to be retrained because the connected sink raised +a long pulse to indicate link loss. If the sink did so, +intel_dp_hotplug() would have handled link retraining. Looking at the +logs in Bugzilla referenced in commit '3cf71bc9904d ("drm/i915: Re-apply +Perform link quality check, unconditionally during long pulse"")', the +issue is that the sink does not trigger an interrupt. What we want is +->detect() from user space to check link status and retrain. Ville's +review for the original patch also indicates the same root cause. So, +rewrite the comment. + +v2: Patch split and rewrote comment. + +Cc: Lyude Paul +Cc: Ville Syrjälä +Cc: Jani Nikula +Cc: Rodrigo Vivi +Cc: Jan-Marek Glogowski +References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") +Signed-off-by: Dhinakaran Pandiyan +Reviewed-by: Ville Syrjälä +--- + drivers/gpu/drm/i915/intel_dp.c | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c +index 256a71c8c093..207b3ea2ed1a 100644 +--- a/drivers/gpu/drm/i915/intel_dp.c ++++ b/drivers/gpu/drm/i915/intel_dp.c +@@ -5074,16 +5074,9 @@ intel_dp_long_pulse(struct intel_connector *connector, + 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. ++ * Some external monitors do not signal loss of link ++ * synchronization with an IRQ_HPD, so force a link status ++ * check. + */ + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; + diff --git a/CI-2-6-drm-i915-dp-Restrict-link-retrain-workaround-to-external-monitors.patch b/CI-2-6-drm-i915-dp-Restrict-link-retrain-workaround-to-external-monitors.patch new file mode 100644 index 000000000..bb9106d05 --- /dev/null +++ b/CI-2-6-drm-i915-dp-Restrict-link-retrain-workaround-to-external-monitors.patch @@ -0,0 +1,55 @@ +From patchwork Thu Sep 27 20:57:31 2018 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: [CI, 2/6] drm/i915/dp: Restrict link retrain workaround to external + monitors +From: Dhinakaran Pandiyan +X-Patchwork-Id: 253514 +Message-Id: <20180927205735.16651-2-dhinakaran.pandiyan@intel.com> +To: intel-gfx@lists.freedesktop.org +Date: Thu, 27 Sep 2018 13:57:31 -0700 + +Commit '3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, +unconditionally during long pulse"")' applies a work around for sinks +that don't signal link loss. The work around does not need to have to be +that broad as the issue was seen with only one particular monitor; limit +this only for external displays as eDP features like PSR turn off the link +and the driver ends up retraining the link seeeing that link is not +synchronized. + +Cc: Lyude Paul +Cc: Jan-Marek Glogowski +Cc: Ville Syrjälä +Cc: Rodrigo Vivi +References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") +Signed-off-by: Dhinakaran Pandiyan +Reviewed-by: Ville Syrjälä +--- + drivers/gpu/drm/i915/intel_dp.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c +index 207b3ea2ed1a..4e0870f3a4a5 100644 +--- a/drivers/gpu/drm/i915/intel_dp.c ++++ b/drivers/gpu/drm/i915/intel_dp.c +@@ -5072,12 +5072,13 @@ intel_dp_long_pulse(struct intel_connector *connector, + */ + status = connector_status_disconnected; + goto out; +- } else { +- /* +- * Some external monitors do not signal loss of link +- * synchronization with an IRQ_HPD, so force a link status +- * check. +- */ ++ } ++ ++ /* ++ * Some external monitors do not signal loss of link synchronization ++ * with an IRQ_HPD, so force a link status check. ++ */ ++ if (!intel_dp_is_edp(intel_dp)) { + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; + + intel_dp_retrain_link(encoder, ctx); diff --git a/kernel.spec b/kernel.spec index 4f4240376..77230d4fc 100644 --- a/kernel.spec +++ b/kernel.spec @@ -621,6 +621,10 @@ Patch502: input-rmi4-remove-the-need-for-artifical-IRQ.patch Patch506: 0001-random-add-a-config-option-to-trust-the-CPU-s-hwrng.patch Patch507: 0001-random-make-CPU-trust-a-boot-parameter.patch +# Fix known regression +Patch509: CI-1-6-drm-i915-dp-Fix-link-retraining-comment-in-intel_dp_long_pulse.patch +Patch510: CI-2-6-drm-i915-dp-Restrict-link-retrain-workaround-to-external-monitors.patch + # END OF PATCH DEFINITIONS %endif @@ -1870,6 +1874,9 @@ fi # # %changelog +* Tue Oct 23 2018 Laura Abbott +- Add i915 eDP fixes + * Sat Oct 20 2018 Peter Robinson 4.18.16-100 - Linux v4.18.16 - Fix network on some i.MX6 devices (rhbz 1628209)