[PATCH 0/1][Unstable/OEM-5.10] UBUNTU: SAUCE: Fix the video can't output through WD19TB connected with TGL platform during cold-boot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/1][Unstable/OEM-5.10] UBUNTU: SAUCE: Fix the video can't output through WD19TB connected with TGL platform during cold-boot

Koba Ko
BugLink: https://bugs.launchpad.net/bugs/1910211

[Impact]
After Apply the patches from https://www.spinics.net/lists/intel-gfx/msg248700.html,
the TGL platform would have the failure rate(1/20) on outputting the video through WD19TB.

[Fix]
The patch is provided by Imre(https://gitlab.freedesktop.org/drm/intel/-/issues/2801#note_740352).
If there's no lttpr in the link chain, the DRM driver wouldn't configure the transparent mode again.

[Test Case]
1. Connected the WD19TB with the TGL platform and
connected the external monitor on WD19TB with HDMI/Displayport.
2. Don't plug the external monitor on the TGL platform, so there's only one monitor on WD19TB.
3. Cold boot the TGL platform.
4. Check the monitor can be blinked and the video can output to the monitor.

[Where problems could occur]
As per Imre's comment, this may be caused by the dock.
In the future if the WD19TB's firmware is updated, we may encounter the same issue again.


Imre Deak (1):
  UBUNTU: SAUCE: drm/i915/dp: Prevent setting LTTPR mode if no LTTPR is
    detected

 .../drm/i915/display/intel_dp_link_training.c | 36 ++++++++-----------
 1 file changed, 15 insertions(+), 21 deletions(-)

--
2.25.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1][Unstable/OEM-5.10] UBUNTU: SAUCE: drm/i915/dp: Prevent setting LTTPR mode if no LTTPR is detected

Koba Ko
From: Imre Deak <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1910211 

Signed-off-by: Imre Deak <[hidden email]>
Reference: https://gitlab.freedesktop.org/drm/intel/-/issues/2801#note_740352
Signed-off-by: Koba Ko <[hidden email]>
---
 .../drm/i915/display/intel_dp_link_training.c | 36 ++++++++-----------
 1 file changed, 15 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
index 91d3979902d0..db4862760011 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
@@ -34,18 +34,6 @@ intel_dp_dump_link_status(const u8 link_status[DP_LINK_STATUS_SIZE])
       link_status[3], link_status[4], link_status[5]);
 }
 
-static int intel_dp_lttpr_count(struct intel_dp *intel_dp)
-{
- int count = drm_dp_lttpr_count(intel_dp->lttpr_common_caps);
-
- /*
- * Pretend no LTTPRs in case of LTTPR detection error, or
- * if too many (>8) LTTPRs are detected. This translates to link
- * training in transparent mode.
- */
- return count <= 0 ? 0 : count;
-}
-
 static void intel_dp_reset_lttpr_count(struct intel_dp *intel_dp)
 {
  intel_dp->lttpr_common_caps[DP_PHY_REPEATER_CNT -
@@ -142,6 +130,17 @@ int intel_dp_lttpr_init(struct intel_dp *intel_dp)
  return 0;
 
  ret = intel_dp_read_lttpr_common_caps(intel_dp);
+ if (!ret)
+ return 0;
+
+ lttpr_count = drm_dp_lttpr_count(intel_dp->lttpr_common_caps);
+ /*
+ * Prevent setting LTTPR transparent mode explicitly if no LTTPRs are
+ * detected as this breaks link training at least on the Dell WD19TB
+ * dock.
+ */
+ if (lttpr_count == 0)
+ return 0;
 
  /*
  * See DP Standard v2.0 3.6.6.1. about the explicit disabling of
@@ -150,17 +149,12 @@ int intel_dp_lttpr_init(struct intel_dp *intel_dp)
  */
  intel_dp_set_lttpr_transparent_mode(intel_dp, true);
 
- if (!ret)
- return 0;
-
- lttpr_count = intel_dp_lttpr_count(intel_dp);
-
  /*
  * In case of unsupported number of LTTPRs or failing to switch to
  * non-transparent mode fall-back to transparent link training mode,
  * still taking into account any LTTPR common lane- rate/count limits.
  */
- if (lttpr_count == 0)
+ if (lttpr_count < 0)
  return 0;
 
  if (!intel_dp_set_lttpr_transparent_mode(intel_dp, false)) {
@@ -222,11 +216,11 @@ intel_dp_phy_is_downstream_of_source(struct intel_dp *intel_dp,
      enum drm_dp_phy dp_phy)
 {
  struct drm_i915_private *i915 = dp_to_i915(intel_dp);
- int lttpr_count = intel_dp_lttpr_count(intel_dp);
+ int lttpr_count = drm_dp_lttpr_count(intel_dp->lttpr_common_caps);
 
- drm_WARN_ON_ONCE(&i915->drm, lttpr_count == 0 && dp_phy != DP_PHY_DPRX);
+ drm_WARN_ON_ONCE(&i915->drm, lttpr_count <= 0 && dp_phy != DP_PHY_DPRX);
 
- return lttpr_count == 0 || dp_phy == DP_PHY_LTTPR(lttpr_count - 1);
+ return lttpr_count <= 0 || dp_phy == DP_PHY_LTTPR(lttpr_count - 1);
 }
 
 static u8 intel_dp_phy_voltage_max(struct intel_dp *intel_dp,
--
2.25.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED [OEM-5.10] Re: [PATCH 0/1][Unstable/OEM-5.10] UBUNTU: SAUCE: Fix the video can't output through WD19TB connected with TGL platform during cold-boot

Timo Aaltonen-6
In reply to this post by Koba Ko
On 5.1.2021 11.33, Koba Ko wrote:

> BugLink: https://bugs.launchpad.net/bugs/1910211
>
> [Impact]
> After Apply the patches from https://www.spinics.net/lists/intel-gfx/msg248700.html,
> the TGL platform would have the failure rate(1/20) on outputting the video through WD19TB.
>
> [Fix]
> The patch is provided by Imre(https://gitlab.freedesktop.org/drm/intel/-/issues/2801#note_740352).
> If there's no lttpr in the link chain, the DRM driver wouldn't configure the transparent mode again.
>
> [Test Case]
> 1. Connected the WD19TB with the TGL platform and
> connected the external monitor on WD19TB with HDMI/Displayport.
> 2. Don't plug the external monitor on the TGL platform, so there's only one monitor on WD19TB.
> 3. Cold boot the TGL platform.
> 4. Check the monitor can be blinked and the video can output to the monitor.
>
> [Where problems could occur]
> As per Imre's comment, this may be caused by the dock.
> In the future if the WD19TB's firmware is updated, we may encounter the same issue again.
>
>
> Imre Deak (1):
>    UBUNTU: SAUCE: drm/i915/dp: Prevent setting LTTPR mode if no LTTPR is
>      detected
>
>   .../drm/i915/display/intel_dp_link_training.c | 36 ++++++++-----------
>   1 file changed, 15 insertions(+), 21 deletions(-)
>

Applied to oem-5.10, thanks


--
t

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/1][Unstable/OEM-5.10] UBUNTU: SAUCE: drm/i915/dp: Prevent setting LTTPR mode if no LTTPR is detected

Paolo Pisati-5
In reply to this post by Koba Ko
On Tue, Jan 05, 2021 at 05:33:47PM +0800, Koba Ko wrote:
> From: Imre Deak <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1910211 
>
> Signed-off-by: Imre Deak <[hidden email]>
> Reference: https://gitlab.freedesktop.org/drm/intel/-/issues/2801#note_740352
> Signed-off-by: Koba Ko <[hidden email]>

It doesn't apply on top of unstable/master linux 5.10, could you check?
--
bye,
p.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED (unstable/5.11): [PATCH 0/1][Unstable/OEM-5.10] UBUNTU: SAUCE: Fix the video can't output through WD19TB connected with TGL platform during cold-boot

Andrea Righi
In reply to this post by Koba Ko
On Tue, Jan 05, 2021 at 05:33:46PM +0800, Koba Ko wrote:

> BugLink: https://bugs.launchpad.net/bugs/1910211
>
> [Impact]
> After Apply the patches from https://www.spinics.net/lists/intel-gfx/msg248700.html,
> the TGL platform would have the failure rate(1/20) on outputting the video through WD19TB.
>
> [Fix]
> The patch is provided by Imre(https://gitlab.freedesktop.org/drm/intel/-/issues/2801#note_740352).
> If there's no lttpr in the link chain, the DRM driver wouldn't configure the transparent mode again.
>
> [Test Case]
> 1. Connected the WD19TB with the TGL platform and
> connected the external monitor on WD19TB with HDMI/Displayport.
> 2. Don't plug the external monitor on the TGL platform, so there's only one monitor on WD19TB.
> 3. Cold boot the TGL platform.
> 4. Check the monitor can be blinked and the video can output to the monitor.
>
> [Where problems could occur]
> As per Imre's comment, this may be caused by the dock.
> In the future if the WD19TB's firmware is updated, we may encounter the same issue again.
>
>
> Imre Deak (1):
>   UBUNTU: SAUCE: drm/i915/dp: Prevent setting LTTPR mode if no LTTPR is
>     detected

Applied to unstable/5.11.

Thanks,
-Andrea

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team