Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 00/13] Expand kms_dp_link_training coverage
@ 2026-10-01  7:36 Kunal Joshi
  2026-10-01  7:36 ` [PATCH i-g-t 01/13] lib/i915/i915_dp: add helpers for the allowed link configs debugfs Kunal Joshi
                   ` (16 more replies)
  0 siblings, 17 replies; 24+ messages in thread
From: Kunal Joshi @ 2026-10-01  7:36 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

kms_dp_link_training forces the maximum link config, reads the link rate
back from debugfs, and asserts the two match. Both values are
intel_dp->link_rate, i.e. what the driver asked the sink for, not what
the link ended up running at, so a link that failed training and fell
back still passes. The FIXME in the test has been saying this for a
while. Nothing below the maximum is trained at all, which is precisely
the range every fallback and every bandwidth constrained modeset uses.

The series turns this into a sweep over the link configuration space:

 - lib helpers for the debugfs the test needs (allowed link configs,
   forced rate/lane, retrain state, Type-C port mode), plus generic DPCD
   read and link status helpers in lib/igt_dp covering both 8b/10b and
   128b/132b.

 - Enumerate the configs in intel_dp_allowed_link_configs, i.e. the
   intersection the driver really picks from, force each in turn as a
   dynamic subtest, and verify from both ends: no link recovery in
   progress, retraining not disabled, and the sink reporting CR, EQ and
   symbol lock on every active lane.

 - Configs that cannot carry the modes are skipped rather than failed,
   using the aggregate data rate of all streams the commit enables.
   Deriving the floor from the driver's unforced choice does not work
   for MST, where it always configures max link bw.

 - Outputs are grouped into links, so an MST topology is trained once as
   a unit, and every output is covered instead of the first one. Per
   connector mode subtests drive the smallest mode the sink offers,
   which keeps the most configs reachable.

 - Separate subtests for tbt-alt and direct links. That is where the
   link clock comes from, and today a lab with no dock and a lab with a
   broken tunnel look identical. The connector mode has to be in the
   static subtest name, since a dynamic subtest that skips is not
   counted as executed and the no-dock lab would report green.

The old four subtests keep their names and their PHY agnostic scope.
Everything new is guarded by igt_require() on the debugfs it needs, and
the sink side checks skip when the DP AUX chardev is not built in.

Kunal Joshi (13):
  lib/i915/i915_dp: add helpers for the allowed link configs debugfs
  tests/intel/kms_dp_link_training: use i915_dp_is_uhbr_rate()
  tests/intel/kms_dp_link_training: extract train_link_config()
  tests/intel/kms_dp_link_training: detect links that failed training
  tests/intel/kms_dp_link_training: use the lowest pixel clock mode
  tests/intel/kms_dp_link_training: train all allowed link configs
  lib/i915/i915_dp: add i915_dp_get_tc_mode()
  tests/intel/kms_dp_link_training: log the DP link inventory
  tests/intel/kms_dp_link_training: train each MST topology only once
  tests/intel/kms_dp_link_training: add tbt-alt and direct link subtests
  lib/igt_dp: add DPCD read helpers
  lib/igt_dp: add DPCD link status and channel coding checks
  tests/intel/kms_dp_link_training: check the link from the sink side

 lib/i915/i915_dp.c                 | 192 +++++++
 lib/i915/i915_dp.h                 |  41 ++
 lib/igt_dp.c                       | 211 ++++++++
 lib/igt_dp.h                       |  13 +
 tests/intel/kms_dp_link_training.c | 770 +++++++++++++++++++++++++----
 5 files changed, 1126 insertions(+), 101 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 24+ messages in thread
* [PATCH i-g-t 00/13] Expand kms_dp_link_training coverage
@ 2026-09-16  4:47 Kunal Joshi
  2026-09-16  4:47 ` [PATCH i-g-t 03/13] tests/intel/kms_dp_link_training: Extract train_link_config() Kunal Joshi
  0 siblings, 1 reply; 24+ messages in thread
From: Kunal Joshi @ 2026-09-16  4:47 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

kms_dp_link_training forces the maximum link config, reads the link rate
back from debugfs, and asserts the two match. Both values are
intel_dp->link_rate, i.e. what the driver asked the sink for, not what
the link ended up running at, so a link that failed training and fell
back still passes. The FIXME in the test has been saying this for a
while. Nothing below the maximum is trained at all, which is precisely
the range every fallback and every bandwidth constrained modeset uses.

The series turns this into a sweep over the link configuration space:

 - lib helpers for the debugfs the test needs (allowed link configs,
   forced rate/lane, retrain state, Type-C port mode), plus generic DPCD
   read and link status helpers in lib/igt_dp covering both 8b/10b and
   128b/132b.

 - Enumerate the configs in intel_dp_allowed_link_configs, i.e. the
   intersection the driver really picks from, force each in turn as a
   dynamic subtest, and verify from both ends: no link recovery in
   progress, retraining not disabled, and the sink reporting CR, EQ and
   symbol lock on every active lane.

 - Configs that cannot carry the modes are skipped rather than failed,
   using the aggregate data rate of all streams the commit enables.
   Deriving the floor from the driver's unforced choice does not work
   for MST, where it always configures max link bw.

 - Outputs are grouped into links, so an MST topology is trained once as
   a unit, and every output is covered instead of the first one. Per
   connector mode subtests drive the smallest mode the sink offers,
   which keeps the most configs reachable.

 - Separate subtests for tbt-alt and direct links. That is where the
   link clock comes from, and today a lab with no dock and a lab with a
   broken tunnel look identical. The connector mode has to be in the
   static subtest name, since a dynamic subtest that skips is not
   counted as executed and the no-dock lab would report green.

The old four subtests keep their names and their PHY agnostic scope.
Everything new is guarded by igt_require() on the debugfs it needs, and
the sink side checks skip when the DP AUX chardev is not built in.

Kunal Joshi (13):
  lib/i915/i915_dp: Add helpers for the allowed link configs debugfs
  tests/intel/kms_dp_link_training: Use the UHBR helpers from lib
  tests/intel/kms_dp_link_training: Extract train_link_config()
  tests/intel/kms_dp_link_training: Check the config survived training
  tests/intel/kms_dp_link_training: Drive the smallest mode the sink
    offers
  tests/intel/kms_dp_link_training: Train every allowed link config
  lib/i915/i915_dp: Add a Type-C port mode query
  tests/intel/kms_dp_link_training: Log the DP link inventory in the
    fixture
  tests/intel/kms_dp_link_training: Group the outputs into links
  tests/intel/kms_dp_link_training: Add per connector mode subtests
  lib/igt_dp: Add DPCD read helpers
  lib/igt_dp: Add link status predicates for both channel codings
  tests/intel/kms_dp_link_training: Verify the trained link from the
    sink side

 lib/i915/i915_dp.c                 | 192 ++++++++
 lib/i915/i915_dp.h                 |  41 ++
 lib/igt_dp.c                       | 211 ++++++++
 lib/igt_dp.h                       |  13 +
 tests/intel/kms_dp_link_training.c | 767 +++++++++++++++++++++++++----
 5 files changed, 1123 insertions(+), 101 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2026-10-05 16:06 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01  7:36 [PATCH i-g-t 00/13] Expand kms_dp_link_training coverage Kunal Joshi
2026-10-01  7:36 ` [PATCH i-g-t 01/13] lib/i915/i915_dp: add helpers for the allowed link configs debugfs Kunal Joshi
2026-10-01  7:36 ` [PATCH i-g-t 02/13] tests/intel/kms_dp_link_training: use i915_dp_is_uhbr_rate() Kunal Joshi
2026-10-01  7:36 ` [PATCH i-g-t 03/13] tests/intel/kms_dp_link_training: extract train_link_config() Kunal Joshi
2026-10-01  7:36 ` [PATCH i-g-t 04/13] tests/intel/kms_dp_link_training: detect links that failed training Kunal Joshi
2026-10-01  9:05   ` S, Sowmiya
2026-10-01  7:36 ` [PATCH i-g-t 05/13] tests/intel/kms_dp_link_training: use the lowest pixel clock mode Kunal Joshi
2026-10-01  7:36 ` [PATCH i-g-t 06/13] tests/intel/kms_dp_link_training: train all allowed link configs Kunal Joshi
2026-10-01  9:05   ` S, Sowmiya
2026-10-01  7:36 ` [PATCH i-g-t 07/13] lib/i915/i915_dp: add i915_dp_get_tc_mode() Kunal Joshi
2026-10-01  7:36 ` [PATCH i-g-t 08/13] tests/intel/kms_dp_link_training: log the DP link inventory Kunal Joshi
2026-10-01  7:36 ` [PATCH i-g-t 09/13] tests/intel/kms_dp_link_training: train each MST topology only once Kunal Joshi
2026-10-01  7:37 ` [PATCH i-g-t 10/13] tests/intel/kms_dp_link_training: add tbt-alt and direct link subtests Kunal Joshi
2026-10-01  7:37 ` [PATCH i-g-t 11/13] lib/igt_dp: add DPCD read helpers Kunal Joshi
2026-10-01  7:37 ` [PATCH i-g-t 12/13] lib/igt_dp: add DPCD link status and channel coding checks Kunal Joshi
2026-10-01  7:37 ` [PATCH i-g-t 13/13] tests/intel/kms_dp_link_training: check the link from the sink side Kunal Joshi
2026-10-01 13:13 ` ✓ i915.CI.BAT: success for Expand kms_dp_link_training coverage (rev2) Patchwork
2026-10-01 16:42 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-01 21:02 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-10-05 16:06   ` Joshi, Kunal1
2026-10-02 17:18 ` ✗ i915.CI.Full: " Patchwork
2026-10-05 16:04   ` Joshi, Kunal1
  -- strict thread matches above, loose matches on Subject: below --
2026-09-16  4:47 [PATCH i-g-t 00/13] Expand kms_dp_link_training coverage Kunal Joshi
2026-09-16  4:47 ` [PATCH i-g-t 03/13] tests/intel/kms_dp_link_training: Extract train_link_config() Kunal Joshi
2026-09-22 11:51   ` S, Sowmiya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox