mbox series

[00/15,SRU,U/OEM-5.10] Add DRM support for LTTPR non-transparent link training mode

Message ID 20201124091230.335132-1-vicamo.yang@canonical.com
Headers show
Series Add DRM support for LTTPR non-transparent link training mode | expand

Message

You-Sheng Yang Nov. 24, 2020, 9:12 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1903969

[Impact]

On platforms supported DP tunneling over USB 3.2 or so, a Retimer is
required on the host side to cover insertion loss. On such platforms the
rtimer firmware maybe configured to use LTTPR (Link Training Tunable PHY
Repeater) non-transparent mode only, which is only supported in drm-tip
currently. Without LTTPR support, link training may fail with following
error messages depending on the data path configuration:

  i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
  i915 0000:00:02.0: [drm] *ERROR* CPU pipe A FIFO underrun

[Fix]

Patchset https://www.spinics.net/lists/intel-gfx/msg248700.html
("drm/i915: Add support for LTTPR non-transparent link training mode")
is required to fix this issue. It has been landed to drm-tip and will
only included to mainline in v5.11.

Patchset https://patchwork.freedesktop.org/series/76993/ ("Plumb crtc
state to link training code") is included for link training functions
prototype changes.

[Test Case]

On Dell OptiPlex and WD19 docking station, use following steps to verify:
1. disconnect WD19 from OptiPlex, disconnect OptiPlex's power
2. attach OptiPlex's power cord
3. attach WD19's power cord
4. attach DP to WD19
5. attach WD19 to OptiPlex
6. boot up and check if boot to GUI directly
7. `dmesg` and check if aforementioned DRM link training error appears

[Regression Potential]

The second patchset pulled for dependency doesn't have too much
effective changes but refactoring some translation functions, so very
unlikely to have regressions.

For the major part, LTTPR support, when LTTPR is either not detected or
not supported, it will fall back to use transparent mode as it was.
Otherwise, DP Standard recommends to use LTTPR non-transparent mode for
link training, so this should be the right way to have best hardware
support.

Imre Deak (6):
  drm/i915: Fix DP link training pattern mask
  drm/i915: Simplify the link training functions
  drm/i915: Factor out a helper to disable the DPCD training pattern
  drm/dp: Add LTTPR helpers
  drm/i915: Switch to LTTPR transparent mode link training
  drm/i915: Switch to LTTPR non-transparent mode link training

Ville Syrjälä (9):
  drm/i915: s/old_crtc_state/crtc_state/
  drm/i915: Make intel_dp_process_phy_request() static
  drm/i915: Shove the PHY test into the hotplug work
  drm/i915: Split ICL combo PHY buf trans per output type
  drm/i915: Split ICL MG PHY buf trans per output type
  drm/i915: Split EHL combo PHY buf trans per output type
  drm/i915: Split TGL combo PHY buf trans per output type
  drm/i915: Split TGL DKL PHY buf trans per output type
  drm/i915: Plumb crtc_state to link training

 drivers/gpu/drm/drm_dp_helper.c               | 232 +++++++-
 drivers/gpu/drm/i915/display/intel_ddi.c      | 560 ++++++++++--------
 drivers/gpu/drm/i915/display/intel_ddi.h      |   6 +-
 .../drm/i915/display/intel_display_types.h    |  19 +-
 drivers/gpu/drm/i915/display/intel_dp.c       | 318 +++++++---
 drivers/gpu/drm/i915/display/intel_dp.h       |  11 +-
 .../drm/i915/display/intel_dp_link_training.c | 554 ++++++++++++++---
 .../drm/i915/display/intel_dp_link_training.h |  17 +-
 drivers/gpu/drm/i915/display/intel_dpio_phy.c |  23 +-
 drivers/gpu/drm/i915/display/intel_dpio_phy.h |   2 +
 drivers/gpu/drm/i915/display/intel_hdmi.c     |   7 +-
 include/drm/drm_dp_helper.h                   |  62 ++
 12 files changed, 1355 insertions(+), 456 deletions(-)

Comments

Timo Aaltonen Nov. 25, 2020, 1:54 p.m. UTC | #1
On 24.11.2020 11.12, You-Sheng Yang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1903969
> 
> [Impact]
> 
> On platforms supported DP tunneling over USB 3.2 or so, a Retimer is
> required on the host side to cover insertion loss. On such platforms the
> rtimer firmware maybe configured to use LTTPR (Link Training Tunable PHY
> Repeater) non-transparent mode only, which is only supported in drm-tip
> currently. Without LTTPR support, link training may fail with following
> error messages depending on the data path configuration:
> 
>    i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
>    i915 0000:00:02.0: [drm] *ERROR* CPU pipe A FIFO underrun
> 
> [Fix]
> 
> Patchset https://www.spinics.net/lists/intel-gfx/msg248700.html
> ("drm/i915: Add support for LTTPR non-transparent link training mode")
> is required to fix this issue. It has been landed to drm-tip and will
> only included to mainline in v5.11.
> 
> Patchset https://patchwork.freedesktop.org/series/76993/ ("Plumb crtc
> state to link training code") is included for link training functions
> prototype changes.
> 
> [Test Case]
> 
> On Dell OptiPlex and WD19 docking station, use following steps to verify:
> 1. disconnect WD19 from OptiPlex, disconnect OptiPlex's power
> 2. attach OptiPlex's power cord
> 3. attach WD19's power cord
> 4. attach DP to WD19
> 5. attach WD19 to OptiPlex
> 6. boot up and check if boot to GUI directly
> 7. `dmesg` and check if aforementioned DRM link training error appears
> 
> [Regression Potential]
> 
> The second patchset pulled for dependency doesn't have too much
> effective changes but refactoring some translation functions, so very
> unlikely to have regressions.
> 
> For the major part, LTTPR support, when LTTPR is either not detected or
> not supported, it will fall back to use transparent mode as it was.
> Otherwise, DP Standard recommends to use LTTPR non-transparent mode for
> link training, so this should be the right way to have best hardware
> support.
> 
> Imre Deak (6):
>    drm/i915: Fix DP link training pattern mask
>    drm/i915: Simplify the link training functions
>    drm/i915: Factor out a helper to disable the DPCD training pattern
>    drm/dp: Add LTTPR helpers
>    drm/i915: Switch to LTTPR transparent mode link training
>    drm/i915: Switch to LTTPR non-transparent mode link training
> 
> Ville Syrjälä (9):
>    drm/i915: s/old_crtc_state/crtc_state/
>    drm/i915: Make intel_dp_process_phy_request() static
>    drm/i915: Shove the PHY test into the hotplug work
>    drm/i915: Split ICL combo PHY buf trans per output type
>    drm/i915: Split ICL MG PHY buf trans per output type
>    drm/i915: Split EHL combo PHY buf trans per output type
>    drm/i915: Split TGL combo PHY buf trans per output type
>    drm/i915: Split TGL DKL PHY buf trans per output type
>    drm/i915: Plumb crtc_state to link training
> 
>   drivers/gpu/drm/drm_dp_helper.c               | 232 +++++++-
>   drivers/gpu/drm/i915/display/intel_ddi.c      | 560 ++++++++++--------
>   drivers/gpu/drm/i915/display/intel_ddi.h      |   6 +-
>   .../drm/i915/display/intel_display_types.h    |  19 +-
>   drivers/gpu/drm/i915/display/intel_dp.c       | 318 +++++++---
>   drivers/gpu/drm/i915/display/intel_dp.h       |  11 +-
>   .../drm/i915/display/intel_dp_link_training.c | 554 ++++++++++++++---
>   .../drm/i915/display/intel_dp_link_training.h |  17 +-
>   drivers/gpu/drm/i915/display/intel_dpio_phy.c |  23 +-
>   drivers/gpu/drm/i915/display/intel_dpio_phy.h |   2 +
>   drivers/gpu/drm/i915/display/intel_hdmi.c     |   7 +-
>   include/drm/drm_dp_helper.h                   |  62 ++
>   12 files changed, 1355 insertions(+), 456 deletions(-)
> 

While it's a big pile, they are queued for 5.11 and oem-5.10 is not a 
stable kernel yet..

applied to oem-5.10, thanks