1. 07 9月, 2022 1 次提交
    • V
      drm/i915: Implement WaEdpLinkRateDataReload · 672d6ca7
      Ville Syrjälä 提交于
      A lot of modern laptops use the Parade PS8461E MUX for eDP
      switching. The MUX can operate in jitter cleaning mode or
      redriver mode, the first one resulting in higher link
      quality. The jitter cleaning mode needs to know the link
      rate used and the MUX achieves this by snooping the
      LINK_BW_SET, LINK_RATE_SELECT and SUPPORTED_LINK_RATES
      DPCD accesses.
      
      When the MUX is powered down (seems this can happen whenever
      the display is turned off) it loses track of the snooped
      link rates so when we do the LINK_RATE_SELECT write it no
      longer knowns which link rate we're selecting, and thus it
      falls back to the lower quality redriver mode. This results
      in unstable high link rates (eg. usually 8.1Gbps link rate
      no longer works correctly).
      
      In order to avoid all that let's re-snoop SUPPORTED_LINK_RATES
      from the sink at the start of every link training.
      
      Unfortunately we don't have a way to detect the presence of
      the MUX. It looks like the set of laptops equipped with this
      MUX is fairly large and contains devices from multiple
      manufacturers. It may also still be growing with new models.
      So a quirk doesn't seem like a very easily maintainable
      option, thus we shall attempt to do this unconditionally on
      all machines that use LINK_RATE_SELECT. Hopefully this extra
      DPCD read doesn't cause issues for any unaffected machine.
      If that turns out to be the case we'll need to convert this
      into a quirk in the future.
      
      Cc: stable@vger.kernel.org
      Cc: Jason A. Donenfeld <Jason@zx2c4.com>
      Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6205Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220902070319.15395-1-ville.syrjala@linux.intel.comTested-by: NAaron Ma <aaron.ma@canonical.com>
      Tested-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      (cherry picked from commit 25899c59)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      672d6ca7
  2. 27 4月, 2022 1 次提交
    • I
      drm/i915/dp: Add workaround for spurious AUX timeouts/hotplugs on LTTPR links · eddbb074
      Imre Deak 提交于
      To avoid AUX timeouts and subsequent spurious hotplug interrupts, make
      sure that the first DPCD access during detection is a read from an LTTPR
      register.
      
      Some ADLP DP link configuration at least with multiple LTTPRs expects
      the first DPCD access during the LTTPR/DPCD detection after hotplug to
      be a read from the LTTPR range starting with
      DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV. The side effect of
      this read is to put each LTTPR into the LTTPR transparent or LTTPR
      non-transparent mode.
      
      The lack of the above read may leave some of the LTTPRs in non-LTTPR
      mode, while other LTTPRs in LTTPR transparent or LTTPR non-transparent
      mode (for instance LTTPRs after system suspend/resume that kept their
      mode from before suspend). Due to the different AUX timeouts the
      different modes imply, the DPCD access from a non-LTTPR range will
      timeout and lead to an LTTPR generated hotplug towards the source (which
      the LTTPR firmware uses to account for buggy TypeC adapters with a long
      wake-up delay).
      
      SYSCROS: 72939
      
      v2: Keep DPCD read-out working on non-LTTPR platforms.
      v3: Summarize what and why the patch does at the beginning of the commit
          log. (Jani)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220408224629.845887-1-imre.deak@intel.com
      eddbb074
  3. 29 3月, 2022 1 次提交
    • I
      drm/i915: Add a DP1.2 compatible way to read LTTPR capabilities · 657586e4
      Imre Deak 提交于
      At least some DELL monitors (P2715Q) with DPCD_REV 1.2 return corrupted
      DPCD register values when reading from the 0xF0000- LTTPR range with an
      AUX transaction block size bigger than 1. The DP standard requires 0 to
      be returned - as for any other reserved/invalid addresses - but these
      monitors return the DPCD_REV register value repeated in each byte of the
      read buffer. This will in turn corrupt the values returned by the LTTPRs
      between the source and the monitor: LTTPRs must adjust the values they
      read from the downstream DPRX, for instance right-shift/init the
      downstream DP_PHY_REPEATER_CNT value. Since the value returned by the
      monitor's DPRX is non-zero the adjusted values will be corrupt.
      
      Reading the LTTPR registers one-by-one instead of reading all of them
      with a single AUX transfer works around the issue.
      
      According to the DP standard's 0xF0000 register description:
      "LTTPR-related registers at DPCD Addresses F0000h through F02FFh are
      valid only for DPCD r1.4 (or higher)." While it's unclear if DPCD r1.4
      refers to the DPCD_REV or to the
      LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV register (tickets filed
      at the VESA site to clarify this haven't been addressed), one
      possibility is that it's a restriction due to non-compliant monitors
      described above. Disabling the non-transparent LTTPR mode for all such
      monitors is not a viable solution: the transparent LTTPR mode has its
      own issue causing link training failures and this would affect a lot of
      monitors in use with DPCD_REV < 1.4. Instead this patch works around
      the problem by reading the LTTPR common and PHY cap registers one-by-one
      for any monitor with a DPCD_REV < 1.4.
      
      The standard requires the DPCD capabilities to be read after the LTTPR
      common capabilities are read, so re-read the DPCD capabilities after
      the LTTPR common and PHY caps were read out.
      
      v2:
      - Use for instead of a while loop. (Ville)
      - Add to code comment the monitor model with the problem.
      
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4531
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220322143844.42616-1-imre.deak@intel.com
      657586e4
  4. 18 2月, 2022 1 次提交
  5. 11 2月, 2022 3 次提交
  6. 03 12月, 2021 1 次提交
  7. 04 11月, 2021 1 次提交
  8. 19 10月, 2021 1 次提交
  9. 12 10月, 2021 2 次提交
  10. 07 10月, 2021 5 次提交
  11. 04 10月, 2021 4 次提交
  12. 01 10月, 2021 1 次提交
  13. 30 9月, 2021 1 次提交
  14. 20 9月, 2021 2 次提交
  15. 14 9月, 2021 1 次提交
  16. 19 8月, 2021 1 次提交
  17. 18 8月, 2021 1 次提交
  18. 16 8月, 2021 1 次提交
  19. 25 5月, 2021 1 次提交
    • I
      drm/i915: Reenable LTTPR non-transparent LT mode for DPCD_REV<1.4 · e1185142
      Imre Deak 提交于
      The driver currently disables the LTTPR non-transparent link training
      mode for sinks with a DPCD_REV<1.4, based on the following description
      of the LTTPR DPCD register range in DP standard 2.0 (at the 0xF0000
      register description):
      
      ""
      LTTPR-related registers at DPCD Addresses F0000h through F02FFh are valid
      only for DPCD r1.4 (or higher).
      """
      
      The transparent link training mode should still work fine, however the
      implementation for this in some retimer FWs seems to be broken, see the
      References: link below.
      
      After discussions with DP standard authors the above "DPCD r1.4" does
      not refer to the DPCD revision (stored in the DPCD_REV reg at 0x00000),
      rather to the "LTTPR field data structure revision" stored in the
      0xF0000 reg. An update request has been filed at vesa.org (see
      wg/Link/documentComment/3746) for the upcoming v2.1 specification to
      clarify the above description along the following lines:
      
      """
      LTTPR-related registers at DPCD Addresses F0000h through F02FFh are
      valid only for LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV 1.4 (or
      higher)
      """
      
      Based on my tests Windows uses the non-transparent link training mode
      for DPCD_REV==1.2 sinks as well (so presumably for all DPCD_REVs), and
      forcing it to use transparent mode on ICL/TGL platforms leads to the
      same LT failure as reported at the References: link.
      
      Based on the above let's assume that the transparent link training mode
      is not well tested/supported and align the code to the correct
      interpretation of what the r1.4 version refers to.
      Reported-and-tested-by: NCasey Harkins <caseyharkins@gmail.com>
      Tested-by: NKhaled Almahallawy <khaled.almahallawy@intel.com>
      References: https://gitlab.freedesktop.org/drm/intel/-/issues/3415
      Fixes: 264613b4 ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4")
      Cc: <stable@vger.kernel.org> # v5.11+
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NKhaled Almahallawy <khaled.almahallawy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210512212809.1234701-1-imre.deak@intel.com
      (cherry picked from commit cb4920cc)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      e1185142
  20. 21 5月, 2021 1 次提交
    • I
      drm/i915: Reenable LTTPR non-transparent LT mode for DPCD_REV<1.4 · cb4920cc
      Imre Deak 提交于
      The driver currently disables the LTTPR non-transparent link training
      mode for sinks with a DPCD_REV<1.4, based on the following description
      of the LTTPR DPCD register range in DP standard 2.0 (at the 0xF0000
      register description):
      
      ""
      LTTPR-related registers at DPCD Addresses F0000h through F02FFh are valid
      only for DPCD r1.4 (or higher).
      """
      
      The transparent link training mode should still work fine, however the
      implementation for this in some retimer FWs seems to be broken, see the
      References: link below.
      
      After discussions with DP standard authors the above "DPCD r1.4" does
      not refer to the DPCD revision (stored in the DPCD_REV reg at 0x00000),
      rather to the "LTTPR field data structure revision" stored in the
      0xF0000 reg. An update request has been filed at vesa.org (see
      wg/Link/documentComment/3746) for the upcoming v2.1 specification to
      clarify the above description along the following lines:
      
      """
      LTTPR-related registers at DPCD Addresses F0000h through F02FFh are
      valid only for LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV 1.4 (or
      higher)
      """
      
      Based on my tests Windows uses the non-transparent link training mode
      for DPCD_REV==1.2 sinks as well (so presumably for all DPCD_REVs), and
      forcing it to use transparent mode on ICL/TGL platforms leads to the
      same LT failure as reported at the References: link.
      
      Based on the above let's assume that the transparent link training mode
      is not well tested/supported and align the code to the correct
      interpretation of what the r1.4 version refers to.
      Reported-and-tested-by: NCasey Harkins <caseyharkins@gmail.com>
      Tested-by: NKhaled Almahallawy <khaled.almahallawy@intel.com>
      References: https://gitlab.freedesktop.org/drm/intel/-/issues/3415
      Fixes: 264613b4 ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4")
      Cc: <stable@vger.kernel.org> # v5.11+
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NKhaled Almahallawy <khaled.almahallawy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210512212809.1234701-1-imre.deak@intel.com
      cb4920cc
  21. 28 4月, 2021 2 次提交
  22. 26 4月, 2021 1 次提交
  23. 20 4月, 2021 1 次提交
  24. 14 4月, 2021 3 次提交
  25. 24 3月, 2021 1 次提交
  26. 23 3月, 2021 1 次提交