Skip to contentSkip to conversation

drm/i915/dp_mst: Fix enabling pipe clock for all streams

PATCH In review Imre Deak 7 participants 14 messages Aug 31, 2018 – Sep 5, 2018

Subsystems (2)
lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/1 drm/i915/dp_mst: Fix enabling pipe clock for all streams

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Fix things by making the above commit truly a non-functional change.

Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365

---
 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +9 -8
index f3b115ce4029..dcb1a98d624d 100644
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
 
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 }
 
 static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	}
 
 	intel_disable_ddi_buf(encoder);
 
drivers/gpu/drm/i915/intel_dp_mst.c +4 -0
index 352e5216cc65..77920f1a3da1 100644
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
 	struct intel_connector *connector =
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
+
+	intel_ddi_enable_pipe_clock(pipe_config);
 }
 
 static void intel_mst_enable_dp(struct intel_encoder *encoder,
Signature · 6 lines
2.13.2

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

✓ Fi.CI.BAT: success for drm/i915/dp_mst: Fix enabling pipe clock for all streams

== Series Details ==

== Series Details ==

Series: drm/i915/dp_mst: Fix enabling pipe clock for all streams
URL : https://patchwork.freedesktop.org/series/49025/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4750 -> Patchwork_10063 =

== Summary - SUCCESS ==

No regressions found.

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

== Known issues ==

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

=== IGT changes ===

    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      {fi-byt-clapper}:   FAIL (fdo#103191, fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362

== Participating hosts (52 -> 48) ==

Missing (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u

== Build changes ==

* Linux: CI_DRM_4750 -> Patchwork_10063

CI_DRM_4750: ef9613f5ddd35f2bd2834489b6d96e54c0cae8c6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4618: 9d83154c898b5acc8b462d17104df50cfd71e9a0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10063: bb1f39c1120a86a6d33ca3c3fe8679e33a73f133 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

bb1f39c1120a drm/i915/dp_mst: Fix enabling pipe clock for all streams

== Logs ==

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

Reviewed-by on v1 1/1
#2 lore raw
In reply to Imre Deak
Quoted 10 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Fix things by making the above commit truly a non-functional change.

Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365

Quoted 9 lines
Quoted 65 lines
---
 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +9 -8
index f3b115ce4029..dcb1a98d624d 100644
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
 
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 }
 
 static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	}
 
 	intel_disable_ddi_buf(encoder);
 
drivers/gpu/drm/i915/intel_dp_mst.c +4 -0
index 352e5216cc65..77920f1a3da1 100644
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
 	struct intel_connector *connector =
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
+
+	intel_ddi_enable_pipe_clock(pipe_config);
 }
 
 static void intel_mst_enable_dp(struct intel_encoder *encoder,
Signature · 1 line
2.13.2
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by Reviewed-by on v1 1/1
#3 lore raw
In reply to Imre Deak

Tested on my T450s, fixes the regression with MST!

Consider this:

Quoted 89 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Fix things by making the above commit truly a non-functional change.

Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to

encoders")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365

---
 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +2 -1
index f3b115ce4029..dcb1a98d624d 100644
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct
 intel_encoder *encoder,
 
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 }
 

static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,

drivers/gpu/drm/i915/intel_ddi.c +7 -7
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct
 intel_encoder *encoder,
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	}
 
 	intel_disable_ddi_buf(encoder);
drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
index 352e5216cc65..77920f1a3da1 100644
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct
 intel_encoder *encoder,
 	struct intel_connector *connector =
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder
 *encoder,
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
+
+	intel_ddi_enable_pipe_clock(pipe_config);
 }
 

static void intel_mst_enable_dp(struct intel_encoder *encoder,

Signature · 7 lines
Cheers,
	Lyude Paul

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v1 1/1
#4 lore raw
In reply to Imre Deak
Quoted 10 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Fix things by making the above commit truly a non-functional change.

Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365

Quoted 9 lines
Quoted 66 lines
---
 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +9 -8
index f3b115ce4029..dcb1a98d624d 100644
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
 
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 }
 
 static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	}
 
 	intel_disable_ddi_buf(encoder);
 
drivers/gpu/drm/i915/intel_dp_mst.c +4 -0
index 352e5216cc65..77920f1a3da1 100644
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
 	struct intel_connector *connector =
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
+
+	intel_ddi_enable_pipe_clock(pipe_config);
 }
 
 static void intel_mst_enable_dp(struct intel_encoder *encoder,
Signature · 1 line
2.13.2

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

#5 lore raw

✓ Fi.CI.IGT: success for drm/i915/dp_mst: Fix enabling pipe clock for all streams

In reply to Imre Deak
== Series Details ==

== Series Details ==

Series: drm/i915/dp_mst: Fix enabling pipe clock for all streams
URL : https://patchwork.freedesktop.org/series/49025/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4750_full -> Patchwork_10063_full =

== Summary - SUCCESS ==

No regressions found.

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-hsw:          PASS -> INCOMPLETE (fdo#103540, fdo#106886)

    
    ==== Possible fixes ====

    igt@gem_exec_await@wide-contexts:
      shard-kbl:          FAIL (fdo#105900) -> PASS

    igt@gem_exec_suspend@basic-s3-devices:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_frontbuffer_tracking@fbc-suspend:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#105959) -> PASS

    igt@perf@blocking:
      shard-hsw:          FAIL (fdo#102252) -> PASS

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#105959 https://bugs.freedesktop.org/show_bug.cgi?id=105959
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886

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

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4750 -> Patchwork_10063

CI_DRM_4750: ef9613f5ddd35f2bd2834489b6d96e54c0cae8c6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4618: 9d83154c898b5acc8b462d17104df50cfd71e9a0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10063: bb1f39c1120a86a6d33ca3c3fe8679e33a73f133 @ 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_10063/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#6 lore raw

Re: ✓ Fi.CI.IGT: success for drm/i915/dp_mst: Fix enabling pipe clock for all streams

Quoted 5 lines · Patchwork

== Series Details ==

Series: drm/i915/dp_mst: Fix enabling pipe clock for all streams
URL : https://patchwork.freedesktop.org/series/49025/
State : success

Pushed to -dinq, thanks for the report, review and testing.

Quoted 56 lines

== Summary ==

= CI Bug Log - changes from CI_DRM_4750_full -> Patchwork_10063_full =

== Summary - SUCCESS ==

No regressions found.

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-hsw:          PASS -> INCOMPLETE (fdo#103540, fdo#106886)

    
    ==== Possible fixes ====

    igt@gem_exec_await@wide-contexts:
      shard-kbl:          FAIL (fdo#105900) -> PASS

    igt@gem_exec_suspend@basic-s3-devices:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_frontbuffer_tracking@fbc-suspend:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#105959) -> PASS

    igt@perf@blocking:
      shard-hsw:          FAIL (fdo#102252) -> PASS

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#105959 https://bugs.freedesktop.org/show_bug.cgi?id=105959
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886

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

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4750 -> Patchwork_10063

Quoted 8 lines

CI_DRM_4750: ef9613f5ddd35f2bd2834489b6d96e54c0cae8c6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4618: 9d83154c898b5acc8b462d17104df50cfd71e9a0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10063: bb1f39c1120a86a6d33ca3c3fe8679e33a73f133 @ 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_10063/shards.html

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

maintainer
#7 lore raw
In reply to Imre Deak
Quoted 7 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Fix things by making the above commit truly a non-functional change.

What kind of MST setups do we have in CI? Why didn't they catch this?

BR,
Jani.

Quoted 75 lines
Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365

---
 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +9 -8
index f3b115ce4029..dcb1a98d624d 100644
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
 
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 }
 
 static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	}
 
 	intel_disable_ddi_buf(encoder);
 
drivers/gpu/drm/i915/intel_dp_mst.c +4 -0
index 352e5216cc65..77920f1a3da1 100644
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
 	struct intel_connector *connector =
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
+
+	intel_ddi_enable_pipe_clock(pipe_config);
 }
 
 static void intel_mst_enable_dp(struct intel_encoder *encoder,
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#8 lore raw
Quoted 10 lines · Jani Nikula
Quoted 7 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Fix things by making the above commit truly a non-functional change.

What kind of MST setups do we have in CI? Why didn't they catch this?

What we'd need is a dock/other branch device with an DP-MST input and two outputs. That would exercise the case that broke here.

Quoted 75 lines

BR,
Jani.

Quoted 69 lines
Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365

---
 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +9 -8
index f3b115ce4029..dcb1a98d624d 100644
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
 
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 }
 
 static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	}
 
 	intel_disable_ddi_buf(encoder);
 
drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
index 352e5216cc65..77920f1a3da1 100644
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
 	struct intel_connector *connector =
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
Quoted 9 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
+
+	intel_ddi_enable_pipe_clock(pipe_config);
 }
 
 static void intel_mst_enable_dp(struct intel_encoder *encoder,
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center

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

#9 lore raw
Quoted 9 lines · PDT Imre Deak
Quoted 8 lines · Jani Nikula
Quoted 7 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders")
inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Fix things by making the above commit truly a non-functional change.

What kind of MST setups do we have in CI? Why didn't they catch this?

What we'd need is a dock/other branch device with an DP-MST input and two outputs. That would exercise the case that broke here.

I had the same question. We have these two in CI, but both have only one external display attached.
fi-kbl-7560u Dell XPS 13 Kaby Lake / i7-7560u / Iris Plus Graphics 640 GT3e
eDP, DELL TB16->TB->DP-MST
fi-cfl-s3 Intel Coffee Lake-S RVP Coffee Lake eDP-PSR, DP-MST (HDMI)

Tomi,
Is it possible to have another external display connected to one of these?

Quoted 91 lines
Quoted 91 lines

BR,
Jani.

Quoted 88 lines
Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to

encoders") Bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=107365

---

 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_ddi.c index f3b115ce4029..dcb1a98d624d 100644

drivers/gpu/drm/i915/intel_ddi.c +0 -0
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_ddi.c +2 -1
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 
 }
 
 static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_ddi.c +7 -7
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
 
+	}
 
 	intel_disable_ddi_buf(encoder);
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_dp_mst.c index 352e5216cc65..77920f1a3da1 100644

drivers/gpu/drm/i915/intel_dp_mst.c +0 -0
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
 	struct intel_connector *connector =
 
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
 
+
+	intel_ddi_enable_pipe_clock(pipe_config);
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

}

static void intel_mst_enable_dp(struct intel_encoder *encoder,

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

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

maintainer
#10 lore raw
Quoted 17 lines · Dhinakaran Pandiyan
Quoted 9 lines · PDT Imre Deak
Quoted 8 lines · Jani Nikula
Quoted 7 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders")
inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.).

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Fix things by making the above commit truly a non-functional change.

What kind of MST setups do we have in CI? Why didn't they catch this?

What we'd need is a dock/other branch device with an DP-MST input and two outputs. That would exercise the case that broke here.

Quoted 8 lines

I had the same question. We have these two in CI, but both have only one external display attached.
fi-kbl-7560u Dell XPS 13 Kaby Lake / i7-7560u / Iris Plus Graphics 640 GT3e
eDP, DELL TB16->TB->DP-MST
fi-cfl-s3 Intel Coffee Lake-S RVP Coffee Lake eDP-PSR, DP-MST (HDMI)

Tomi,
Is it possible to have another external display connected to one of these?

or to both of them?!

I'm seeing MST related regressions since 4.16 so I'd like to have few different configuration if possible with more than one monitor.

at least one kind of dock and one kind of chain both with 2 monitors plugged in would be good.

Quoted 93 lines
Quoted 93 lines
Quoted 93 lines

BR,
Jani.

Quoted 88 lines
Fixes commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to

encoders") Bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=107365

---

 drivers/gpu/drm/i915/intel_ddi.c    | 17 +++++++++--------
 drivers/gpu/drm/i915/intel_dp_mst.c |  4 ++++
 2 files changed, 13 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_ddi.c index f3b115ce4029..dcb1a98d624d 100644

drivers/gpu/drm/i915/intel_ddi.c +0 -0
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_ddi.c +2 -1
 	icl_enable_phy_clock_gating(dig_port);
 
-	intel_ddi_enable_pipe_clock(crtc_state);
+	if (!is_mst)
+		intel_ddi_enable_pipe_clock(crtc_state);
 
 }
 
 static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_ddi.c +7 -7
 	bool is_mst = intel_crtc_has_type(old_crtc_state,
 
 					  INTEL_OUTPUT_DP_MST);
 
-	intel_ddi_disable_pipe_clock(old_crtc_state);
-
-	/*
-	 * Power down sink before disabling the port, otherwise we end
-	 * up getting interrupts from the sink on detecting link loss.
-	 */
-	if (!is_mst)
+	if (!is_mst) {
+		intel_ddi_disable_pipe_clock(old_crtc_state);
+		/*
+		 * Power down sink before disabling the port, otherwise we end
+		 * up getting interrupts from the sink on detecting link loss.
+		 */
 
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
 
+	}
 
 	intel_disable_ddi_buf(encoder);
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_dp_mst.c index 352e5216cc65..77920f1a3da1 100644

drivers/gpu/drm/i915/intel_dp_mst.c +0 -0
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
 	struct intel_connector *connector =
 
 		to_intel_connector(old_conn_state->connector);
 
+	intel_ddi_disable_pipe_clock(old_crtc_state);
+
 
 	/* this can fail */
 	drm_dp_check_act_status(&intel_dp->mst_mgr);
 	/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct

intel_encoder *encoder,> >

drivers/gpu/drm/i915/intel_dp_mst.c +2 -0
 	I915_WRITE(DP_TP_STATUS(port), temp);
 
 	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
 
+
+	intel_ddi_enable_pipe_clock(pipe_config);
Quoted 12 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

}

static void intel_mst_enable_dp(struct intel_encoder *encoder,

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

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

#11 lore raw
Quoted 35 lines · Rodrigo Vivi
Quoted 34 lines · Dhinakaran Pandiyan
Quoted 16 lines · PDT Imre Deak
Quoted 15 lines · Jani Nikula
Quoted 13 lines · Imre Deak

commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to
encoders")
inadvertently stopped enabling the pipe clock for any DP-MST stream
after the first one. It also rearranged the pipe clock enabling wrt.
initial MST payload allocation step (which may or may not be a
problem, but it's contrary to the spec.).

Fix things by making the above commit truly a non-functional change.

Quoted 7 lines
Quoted 2 lines

What kind of MST setups do we have in CI? Why didn't they catch this?

What we'd need is a dock/other branch device with an DP-MST input and
two outputs. That would exercise the case that broke here.

I had the same question. We have these two in CI, but both have only one
external display attached.
fi-kbl-7560u Dell XPS 13 Kaby Lake / i7-7560u / Iris Plus
Graphics 640 GT3e
eDP, DELL TB16->TB->DP-MST
fi-cfl-s3 Intel Coffee Lake-S RVP Coffee Lake eDP-PSR, DP-
MST (HDMI)

Quoted 6 lines
Quoted 3 lines

Tomi,
Is it possible to have another external display connected to one of these?

or to both of them?!

:) Not sure why I wanted only one of them.

Quoted 2 lines

I'm seeing MST related regressions since 4.16 so I'd like to have few different configuration if possible with more than one monitor.

A 4K@60Hz monitor along with a full-HD (or higher) monitor will be useful to test the link BW code too. Together, they should be exceeding the 63 vcpi slot limit. We can then write new IGT's to verify that.

Quoted 3 lines

at least one kind of dock and one kind of chain both with 2 monitors plugged in would be good.

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

maintainer
#12 lore raw
Quoted 8 lines · Dhinakaran Pandiyan
Quoted 6 lines · Rodrigo Vivi
Quoted 2 lines · Dhinakaran Pandiyan

Is it possible to have another external display connected to one of these?

or to both of them?!

:) Not sure why I wanted only one of them.

Heh, well, we did have a bug in the past where we failed if the device was booted with no displays. Diversify, don't maximize. ;)

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#13 lore raw
Quoted 11 lines · Dhinakaran Pandiyan
Quoted 8 lines · Rodrigo Vivi
Quoted 6 lines · Dhinakaran Pandiyan
Quoted 2 lines

Is it possible to have another external display connected to one of these?

or to both of them?!

:) Not sure why I wanted only one of them.

Heh, well, we did have a bug in the past where we failed if the device was booted with no displays. Diversify, don't maximize. ;)

hehe :)

yeap, makes sense!

Quoted 11 lines

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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