Skip to contentSkip to conversation

drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()

PATCH New Dhinakaran Pandiyan 2 participants 6 messages Sep 27, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()

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 <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Jan-Marek Glogowski <[email protected]>
References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")

---
 drivers/gpu/drm/i915/intel_dp.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +3 -10
index 6b4c19123f2a..34c561011e7a 100644
@@ -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;
 
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/3 drm/i915/dp: Restrict link retrain workaround to external monitors

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 <[email protected]>
Cc: Jan-Marek Glogowski <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")

---
 drivers/gpu/drm/i915/intel_dp.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +7 -6
index 34c561011e7a..6130d05d8b88 100644
@@ -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);
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH 3/3 drm/i915/dp: Use a local variable for intel_encoder *

In reply to Dhinakaran Pandiyan

We have two cases of intel_dp to intel_encoder conversions, use a local variable to store the conversion.

---
 drivers/gpu/drm/i915/intel_dp.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +3 -5
index 6130d05d8b88..09229fc66dec 100644
@@ -5017,6 +5017,7 @@ intel_dp_long_pulse(struct intel_connector *connector,
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
 	struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
+	struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
 	enum drm_connector_status status;
 	u8 sink_irq_vector = 0;
 
@@ -5027,7 +5028,7 @@ intel_dp_long_pulse(struct intel_connector *connector,
 	/* Can't disconnect eDP */
 	if (intel_dp_is_edp(intel_dp))
 		status = edp_detect(intel_dp);
-	else if (intel_digital_port_connected(&dp_to_dig_port(intel_dp)->base))
+	else if (intel_digital_port_connected(encoder))
 		status = intel_dp_detect_dpcd(intel_dp);
 	else
 		status = connector_status_disconnected;
@@ -5078,11 +5079,8 @@ intel_dp_long_pulse(struct intel_connector *connector,
 	 * 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;
-
+	if (!intel_dp_is_edp(intel_dp))
 		intel_dp_retrain_link(encoder, ctx);
-	}
 
 	/*
 	 * Clearing NACK and defer counts to get their exact values
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/3] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()

In reply to Dhinakaran Pandiyan
== Series Details ==

== Series Details ==

Series: series starting with [CI,1/3] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()
URL : https://patchwork.freedesktop.org/series/50251/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
5fd2877f631b drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()
-:27: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#27: 
References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")

-:27: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")' #27:
References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")

-:54: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Dhinakaran Pandiyan <[email protected]>'

total: 1 errors, 2 warnings, 0 checks, 19 lines checked
39750b502fb3 drm/i915/dp: Restrict link retrain workaround to external monitors
-:22: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #22:
References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")

-:22: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")' #22:
References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")

-:49: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Dhinakaran Pandiyan <[email protected]>'

total: 1 errors, 2 warnings, 0 checks, 19 lines checked
e08b75893a11 drm/i915/dp: Use a local variable for intel_encoder *
-:49: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Dhinakaran Pandiyan <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 27 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✓ Fi.CI.BAT: success for series starting with [CI,1/3] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()

In reply to Dhinakaran Pandiyan
== Series Details ==

== Series Details ==

Series: series starting with [CI,1/3] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()
URL : https://patchwork.freedesktop.org/series/50251/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4889 -> Patchwork_10290 =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_10290 need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10290, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/50251/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_10290:

=== IGT changes ===

    ==== Warnings ====

    igt@pm_rpm@basic-pci-d3-state:
      fi-glk-j4005:       SKIP -> PASS

== Known issues ==

Here are the changes found in Patchwork_10290 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@debugfs_test@read_all_entries:
      fi-icl-u:           PASS -> DMESG-WARN (fdo#108070, fdo#107724)

    igt@drv_module_reload@basic-reload:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106248, fdo#106725)

    igt@gem_exec_suspend@basic-s3:
      fi-bdw-samus:       PASS -> INCOMPLETE (fdo#107773)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000, fdo#106097)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000)

    igt@pm_rpm@module-reload:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#107726)

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s3:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

    igt@kms_psr@primary_page_flip:
      fi-cnl-u:           FAIL (fdo#107336) -> PASS
      fi-kbl-r:           FAIL (fdo#107336) -> PASS

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
fdo#107726 https://bugs.freedesktop.org/show_bug.cgi?id=107726
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#108070 https://bugs.freedesktop.org/show_bug.cgi?id=108070

== Participating hosts (42 -> 40) ==

Additional (3): fi-hsw-4770r fi-cfl-8700k fi-skl-6700hq
Missing (5): fi-bsw-cyan fi-ilk-m540 fi-byt-squawks fi-icl-u2 fi-bwr-2160

== Build changes ==

* Linux: CI_DRM_4889 -> Patchwork_10290

CI_DRM_4889: 7759bd849ea6961ccea5039a4b51c5039a386276 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4652: 83352d08b52acd6ee677f9f62dd032b0b8d31835 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10290: e08b75893a11f03d80fdf3eb7070917545c38338 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

e08b75893a11 drm/i915/dp: Use a local variable for intel_encoder * 39750b502fb3 drm/i915/dp: Restrict link retrain workaround to external monitors 5fd2877f631b drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10290/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✓ Fi.CI.IGT: success for series starting with [CI,1/3] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()

In reply to Dhinakaran Pandiyan
== Series Details ==

== Series Details ==

Series: series starting with [CI,1/3] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse()
URL : https://patchwork.freedesktop.org/series/50251/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4889_full -> Patchwork_10290_full =

== Summary - SUCCESS ==

No regressions found.

== Known issues ==

Here are the changes found in Patchwork_10290_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_big:
      shard-hsw:          PASS -> TIMEOUT (fdo#107937)

    igt@gem_exec_schedule@pi-ringfull-vebox:
      shard-glk:          NOTRUN -> FAIL (fdo#103158)

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
      shard-snb:          NOTRUN -> DMESG-WARN (fdo#107956)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-fullscreen:
      shard-glk:          PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_setmode@basic:
      shard-kbl:          PASS -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@kms_flip@plain-flip-ts-check:
      shard-apl:          INCOMPLETE (fdo#103927) -> PASS

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS

    
    ==== Warnings ====

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
      shard-glk:          INCOMPLETE (k.org#198133, fdo#103359) -> DMESG-WARN (fdo#107956)

fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#107937 https://bugs.freedesktop.org/show_bug.cgi?id=107937
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (6 -> 5) ==

Missing (1): shard-skl

== Build changes ==

* Linux: CI_DRM_4889 -> Patchwork_10290

CI_DRM_4889: 7759bd849ea6961ccea5039a4b51c5039a386276 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4652: 83352d08b52acd6ee677f9f62dd032b0b8d31835 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10290: e08b75893a11f03d80fdf3eb7070917545c38338 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10290/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx