mbox series

[0/5] drm/dp: Fix link training interrupted by HPD pulse

Message ID 20250224193115.2058512-1-imre.deak@intel.com (mailing list archive)
Headers show
Series drm/dp: Fix link training interrupted by HPD pulse | expand

Message

Imre Deak Feb. 24, 2025, 7:31 p.m. UTC
This patchset fixes a problem during Display Port link training, where
the link training is interrupted by a short HPD pulse generated by the
sink. Generally the sink signals a bad link state via such short pulses,
but the sink should prevent such signaling during link training.

Some sinks do generate a short pulse as above during link training, or a
pulse generated before the link training started may be handled from a
scheduled work during link training. Such a handling may interfere with
the link training (see patch 3 for the reason), so this patchset
prevents the handling of pulses during link training.

Imre Deak (5):
  drm/i915/hpd: Let an HPD pin be in the disabled state when handling
    missed IRQs
  drm/i915/hpd: Add support for suspending the IRQ handling on an HPD
    pin
  drm/i915/dp: Fix link training interrupted by a short HPD pulse
  drm/i915/dp: Queue a link check after link training is complete
  drm/i915/crt: Use intel_hpd_suspend/resume() instead of
    intel_hpd_disable/enable()

 drivers/gpu/drm/i915/display/intel_crt.c      |   7 +-
 .../gpu/drm/i915/display/intel_display_core.h |   2 +
 .../drm/i915/display/intel_dp_link_training.c |  23 +-
 drivers/gpu/drm/i915/display/intel_hotplug.c  | 264 ++++++++++++++----
 drivers/gpu/drm/i915/display/intel_hotplug.h  |   5 +-
 5 files changed, 237 insertions(+), 64 deletions(-)

Comments

Imre Deak Feb. 25, 2025, 2:25 p.m. UTC | #1
Hi CI team,

On Tue, Feb 25, 2025 at 01:41:55PM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/dp: Fix link training interrupted by HPD pulse (rev3)
> URL   : https://patchwork.freedesktop.org/series/145352/
> State : failure

the issue reported below is unrelated, see my comment there, could you
re-report this result?

> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_16178 -> Patchwork_145352v3
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_145352v3 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_145352v3, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/index.html
> 
> Participating hosts (44 -> 43)
> ------------------------------
> 
>   Missing    (1): fi-snb-2520m 
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_145352v3:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@kms_flip@basic-flip-vs-wf_vblank@b-dp2:
>     - fi-cfl-8109u:       [PASS][1] -> [DMESG-WARN][2] +2 other tests dmesg-warn
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/fi-cfl-8109u/igt@kms_flip@basic-flip-vs-wf_vblank@b-dp2.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/fi-cfl-8109u/igt@kms_flip@basic-flip-vs-wf_vblank@b-dp2.html

There is no HPD IRQ raised or handled on the above host, so the changes
are not related to it.

The issue is:
<3> [158.833677] i915 0000:00:02.0: [drm] *ERROR* CPU pipe A FIFO underrun

It seems to happen frequently, on the same host, leading to incorrect
BAT failures.

There is
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12935

but on a different host (MTL).

> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_145352v3 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@i915_module_load@load:
>     - bat-mtlp-9:         [PASS][3] -> [DMESG-WARN][4] ([i915#13494])
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-mtlp-9/igt@i915_module_load@load.html
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-mtlp-9/igt@i915_module_load@load.html
> 
>   * igt@i915_selftest@live:
>     - bat-twl-2:          [PASS][5] -> [ABORT][6] ([i915#12435] / [i915#12919] / [i915#13503])
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-twl-2/igt@i915_selftest@live.html
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-twl-2/igt@i915_selftest@live.html
> 
>   * igt@i915_selftest@live@memory_region:
>     - bat-twl-2:          [PASS][7] -> [ABORT][8] ([i915#12919])
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-twl-2/igt@i915_selftest@live@memory_region.html
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-twl-2/igt@i915_selftest@live@memory_region.html
> 
>   * igt@i915_selftest@live@requests:
>     - bat-atsm-1:         [PASS][9] -> [INCOMPLETE][10] ([i915#12445])
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-atsm-1/igt@i915_selftest@live@requests.html
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-atsm-1/igt@i915_selftest@live@requests.html
> 
>   * igt@i915_selftest@live@workarounds:
>     - bat-arls-5:         [PASS][11] -> [DMESG-FAIL][12] ([i915#12061]) +1 other test dmesg-fail
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-arls-5/igt@i915_selftest@live@workarounds.html
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-arls-5/igt@i915_selftest@live@workarounds.html
> 
>   * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
>     - bat-dg2-11:         [PASS][13] -> [SKIP][14] ([i915#9197]) +3 other tests skip
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@i915_selftest@live@workarounds:
>     - bat-arlh-3:         [DMESG-FAIL][15] ([i915#12061]) -> [PASS][16] +1 other test pass
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-arlh-3/igt@i915_selftest@live@workarounds.html
>    [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-arlh-3/igt@i915_selftest@live@workarounds.html
> 
>   
> #### Warnings ####
> 
>   * igt@i915_selftest@live:
>     - bat-atsm-1:         [ABORT][17] ([i915#13679]) -> [INCOMPLETE][18] ([i915#12445])
>    [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-atsm-1/igt@i915_selftest@live.html
>    [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-atsm-1/igt@i915_selftest@live.html
> 
>   
>   [i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
>   [i915#12435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12435
>   [i915#12445]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12445
>   [i915#12919]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12919
>   [i915#13494]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13494
>   [i915#13503]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13503
>   [i915#13679]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13679
>   [i915#9197]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9197
> 
> 
> Build changes
> -------------
> 
>   * Linux: CI_DRM_16178 -> Patchwork_145352v3
> 
>   CI-20190529: 20190529
>   CI_DRM_16178: d5debc4841e604372c74ebda0bbf54bd527c3475 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_8247: 8247
>   Patchwork_145352v3: d5debc4841e604372c74ebda0bbf54bd527c3475 @ git://anongit.freedesktop.org/gfx-ci/linux
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/index.html
Ravali, JupallyX Feb. 26, 2025, 4:09 a.m. UTC | #2
Hi,

https://patchwork.freedesktop.org/series/145352/ - Re-reported.
i915.CI.BAT - Re-reported.

Thanks,
Ravali.

-----Original Message-----
From: I915-ci-infra <i915-ci-infra-bounces@lists.freedesktop.org> On Behalf Of Imre Deak
Sent: 25 February 2025 19:55
To: I915-ci-infra@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: ✗ i915.CI.BAT: failure for drm/dp: Fix link training interrupted by HPD pulse (rev3)

Hi CI team,

On Tue, Feb 25, 2025 at 01:41:55PM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/dp: Fix link training interrupted by HPD pulse (rev3)
> URL   : https://patchwork.freedesktop.org/series/145352/
> State : failure

the issue reported below is unrelated, see my comment there, could you re-report this result?

> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_16178 -> Patchwork_145352v3 
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_145352v3 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_145352v3, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/index.html
> 
> Participating hosts (44 -> 43)
> ------------------------------
> 
>   Missing    (1): fi-snb-2520m 
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_145352v3:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@kms_flip@basic-flip-vs-wf_vblank@b-dp2:
>     - fi-cfl-8109u:       [PASS][1] -> [DMESG-WARN][2] +2 other tests dmesg-warn
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/fi-cfl-8109u/igt@kms_flip@basic-flip-vs-wf_vblank@b-dp2.html
>    [2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/fi-cfl-810
> 9u/igt@kms_flip@basic-flip-vs-wf_vblank@b-dp2.html

There is no HPD IRQ raised or handled on the above host, so the changes are not related to it.

The issue is:
<3> [158.833677] i915 0000:00:02.0: [drm] *ERROR* CPU pipe A FIFO underrun

It seems to happen frequently, on the same host, leading to incorrect BAT failures.

There is
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12935

but on a different host (MTL).

> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_145352v3 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@i915_module_load@load:
>     - bat-mtlp-9:         [PASS][3] -> [DMESG-WARN][4] ([i915#13494])
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-mtlp-9/igt@i915_module_load@load.html
>    [4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-mtlp-9
> /igt@i915_module_load@load.html
> 
>   * igt@i915_selftest@live:
>     - bat-twl-2:          [PASS][5] -> [ABORT][6] ([i915#12435] / [i915#12919] / [i915#13503])
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-twl-2/igt@i915_selftest@live.html
>    [6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-twl-2/
> igt@i915_selftest@live.html
> 
>   * igt@i915_selftest@live@memory_region:
>     - bat-twl-2:          [PASS][7] -> [ABORT][8] ([i915#12919])
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-twl-2/igt@i915_selftest@live@memory_region.html
>    [8]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-twl-2/
> igt@i915_selftest@live@memory_region.html
> 
>   * igt@i915_selftest@live@requests:
>     - bat-atsm-1:         [PASS][9] -> [INCOMPLETE][10] ([i915#12445])
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-atsm-1/igt@i915_selftest@live@requests.html
>    [10]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-atsm-1
> /igt@i915_selftest@live@requests.html
> 
>   * igt@i915_selftest@live@workarounds:
>     - bat-arls-5:         [PASS][11] -> [DMESG-FAIL][12] ([i915#12061]) +1 other test dmesg-fail
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-arls-5/igt@i915_selftest@live@workarounds.html
>    [12]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-arls-5
> /igt@i915_selftest@live@workarounds.html
> 
>   * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
>     - bat-dg2-11:         [PASS][13] -> [SKIP][14] ([i915#9197]) +3 other tests skip
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
>    [14]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-dg2-11
> /igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@i915_selftest@live@workarounds:
>     - bat-arlh-3:         [DMESG-FAIL][15] ([i915#12061]) -> [PASS][16] +1 other test pass
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-arlh-3/igt@i915_selftest@live@workarounds.html
>    [16]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-arlh-3
> /igt@i915_selftest@live@workarounds.html
> 
>   
> #### Warnings ####
> 
>   * igt@i915_selftest@live:
>     - bat-atsm-1:         [ABORT][17] ([i915#13679]) -> [INCOMPLETE][18] ([i915#12445])
>    [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16178/bat-atsm-1/igt@i915_selftest@live.html
>    [18]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/bat-atsm-1
> /igt@i915_selftest@live.html
> 
>   
>   [i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
>   [i915#12435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12435
>   [i915#12445]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12445
>   [i915#12919]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12919
>   [i915#13494]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13494
>   [i915#13503]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13503
>   [i915#13679]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13679
>   [i915#9197]: 
> https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9197
> 
> 
> Build changes
> -------------
> 
>   * Linux: CI_DRM_16178 -> Patchwork_145352v3
> 
>   CI-20190529: 20190529
>   CI_DRM_16178: d5debc4841e604372c74ebda0bbf54bd527c3475 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_8247: 8247
>   Patchwork_145352v3: d5debc4841e604372c74ebda0bbf54bd527c3475 @ 
> git://anongit.freedesktop.org/gfx-ci/linux
> 
> == Logs ==
> 
> For more details see: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_145352v3/index.html
Jani Nikula Feb. 26, 2025, 12:55 p.m. UTC | #3
On Mon, 24 Feb 2025, Imre Deak <imre.deak@intel.com> wrote:
> This patchset fixes a problem during Display Port link training, where
> the link training is interrupted by a short HPD pulse generated by the
> sink. Generally the sink signals a bad link state via such short pulses,
> but the sink should prevent such signaling during link training.
>
> Some sinks do generate a short pulse as above during link training, or a
> pulse generated before the link training started may be handled from a
> scheduled work during link training. Such a handling may interfere with
> the link training (see patch 3 for the reason), so this patchset
> prevents the handling of pulses during link training.

I'm wondering if this series is made unnecessarily complicated by
blocking the hotplug handling at the hpd pin level, while what is
actually needed is blocking at the encoder level. I believe that would
be simpler too.

Thoughts?

BR,
Jani.

>
> Imre Deak (5):
>   drm/i915/hpd: Let an HPD pin be in the disabled state when handling
>     missed IRQs
>   drm/i915/hpd: Add support for suspending the IRQ handling on an HPD
>     pin
>   drm/i915/dp: Fix link training interrupted by a short HPD pulse
>   drm/i915/dp: Queue a link check after link training is complete
>   drm/i915/crt: Use intel_hpd_suspend/resume() instead of
>     intel_hpd_disable/enable()
>
>  drivers/gpu/drm/i915/display/intel_crt.c      |   7 +-
>  .../gpu/drm/i915/display/intel_display_core.h |   2 +
>  .../drm/i915/display/intel_dp_link_training.c |  23 +-
>  drivers/gpu/drm/i915/display/intel_hotplug.c  | 264 ++++++++++++++----
>  drivers/gpu/drm/i915/display/intel_hotplug.h  |   5 +-
>  5 files changed, 237 insertions(+), 64 deletions(-)
Imre Deak Feb. 26, 2025, 1:17 p.m. UTC | #4
On Wed, Feb 26, 2025 at 02:55:32PM +0200, Jani Nikula wrote:
> On Mon, 24 Feb 2025, Imre Deak <imre.deak@intel.com> wrote:
> > This patchset fixes a problem during Display Port link training, where
> > the link training is interrupted by a short HPD pulse generated by the
> > sink. Generally the sink signals a bad link state via such short pulses,
> > but the sink should prevent such signaling during link training.
> >
> > Some sinks do generate a short pulse as above during link training, or a
> > pulse generated before the link training started may be handled from a
> > scheduled work during link training. Such a handling may interfere with
> > the link training (see patch 3 for the reason), so this patchset
> > prevents the handling of pulses during link training.
> 
> I'm wondering if this series is made unnecessarily complicated by
> blocking the hotplug handling at the hpd pin level, while what is
> actually needed is blocking at the encoder level. I believe that would
> be simpler too.
> 
> Thoughts?

I think handling it at the HPD pin level makes more sense, since
handling of the HPD IRQs should still happen after they are unblocked.
Also in case of encoders sharing an HPD pin the handling of the IRQs
should be blocked for all the encoders using this pin. The same
block/unblock functionality is also needed for the CRT encoder, so it
makes sense to extend that (intel_hpd_disable/enable) to support digital
ports as well.

> BR,
> Jani.
> 
> >
> > Imre Deak (5):
> >   drm/i915/hpd: Let an HPD pin be in the disabled state when handling
> >     missed IRQs
> >   drm/i915/hpd: Add support for suspending the IRQ handling on an HPD
> >     pin
> >   drm/i915/dp: Fix link training interrupted by a short HPD pulse
> >   drm/i915/dp: Queue a link check after link training is complete
> >   drm/i915/crt: Use intel_hpd_suspend/resume() instead of
> >     intel_hpd_disable/enable()
> >
> >  drivers/gpu/drm/i915/display/intel_crt.c      |   7 +-
> >  .../gpu/drm/i915/display/intel_display_core.h |   2 +
> >  .../drm/i915/display/intel_dp_link_training.c |  23 +-
> >  drivers/gpu/drm/i915/display/intel_hotplug.c  | 264 ++++++++++++++----
> >  drivers/gpu/drm/i915/display/intel_hotplug.h  |   5 +-
> >  5 files changed, 237 insertions(+), 64 deletions(-)
> 
> -- 
> Jani Nikula, Intel