Skip to content

kms_dp_linktrain_fallback: Add UHBR-to-HBR fallback subtest

Sowmiya S igt-dev 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 1 replyIn review
  2. v54 patches 7 repliesSuperseded
  3. v43 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches3 repliesSuperseded
v21 patch3 repliesSuperseded
v11 patch0 repliesSuperseded

v3 from the cover letter

- Drop "exercising the port slice reset path" from SUBTEST description
- Revert unrelated cosmetic hunk in setup_mst_outputs()
- Single UHBR capability gate using i915_dp_get_max_link_rate()
- remove duplicate gate using i915_dp_get_max_supported_rate()
- Fix link rate log units (10 kbit/s, not kbps)
- Add igt_reset_connectors() to pin-loop early-return path
- Replace UHBR10_LINK_RATE define with i915_dp_is_uhbr_rate() helper
- Replace open-coded strtok() parsing with i915_dp_get_next_lower_rate()
- Hard-assert "fallback not reached" instead of returning false
- Remove dead traversed_mst_output_count reset in run_dsc path
- Merge run_uhbr_to_hbr_fallback_test() into run_lt_fallback_test()
- Use "auto" string literal directly (const char * param fix)
- Move reset before UHBR capability gate read in run_lt_fallback_test()
- Document force_uhbr parameter and "clear the pin" reset behaviour

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3lib/i915/i915_dp: Add UHBR helpers and const-correct set_link_paramslib/i915/i915_dp.c lib/i915/i915_dp.h+80 -20 replies
2/3tests/intel/kms_dp_linktrain_fallback: Reset traversed MST output counttests/intel/kms_dp_linktrain_fallback.c+7 -00 replies
3/3tests/intel/kms_dp_linktrain_fallback: Add UHBR-to-HBR fallback subtesttests/intel/kms_dp_linktrain_fallback.c+175 -240 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchKunal Joshi
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH i-g-t v6 0/3] kms_dp_linktrain_fallback: Add UHBR-to-HBR fallback subtest

DP 2.x links use 128b/132b channel encoding for UHBR rates (UHBR10/13.5/20) and 8b/10b for legacy HBR3 and below. The transition between the two encodings goes through a port-slice reset on the source side. The existing dp-fallback subtest only covers 8b/10b-to-8b/10b fallback; this series adds a dedicated subtest for the UHBR->HBR direction.

Adds two library helpers to lib/i915/i915_dp:
- i915_dp_is_uhbr_rate(): mirrors the kernel's drm_dp_is_uhbr_rate()
- i915_dp_get_next_lower_rate(): parses the force_link_rate debugfs list with proper strtok_r/strtol/errno handling

const char * signature for i915_dp_set_link_params() so string literals can be passed directly without a writable-array workaround.

Fixes a pre-existing bug where the file-static traversed_mst_output_count was never reset between subtests, causing all MST outputs to be silently skipped as "already visited" in a full-binary run.

Adds the uhbr-to-hbr-fallback subtest. The subtest pins the link at the highest sustainable UHBR rate (stepping down if the cable cannot sustain the sink's max), forces repeated LT_FAILURE_REDUCED_CAPS failures, and asserts the rate drops below UHBR10. MST topologies are supported since all siblings share the physical link. The existing run_lt_fallback_test() is extended with force_uhbr parameter to avoid ~45 lines of duplication.

v2: Resets MST traversal state per test run
v3:
- Drop "exercising the port slice reset path" from SUBTEST description
- Revert unrelated cosmetic hunk in setup_mst_outputs()
- Single UHBR capability gate using i915_dp_get_max_link_rate()
- remove duplicate gate using i915_dp_get_max_supported_rate()
- Fix link rate log units (10 kbit/s, not kbps)
- Add igt_reset_connectors() to pin-loop early-return path
- Replace UHBR10_LINK_RATE define with i915_dp_is_uhbr_rate() helper
- Replace open-coded strtok() parsing with i915_dp_get_next_lower_rate()
- Hard-assert "fallback not reached" instead of returning false
- Remove dead traversed_mst_output_count reset in run_dsc path
- Merge run_uhbr_to_hbr_fallback_test() into run_lt_fallback_test()
- Use "auto" string literal directly (const char * param fix)
- Move reset before UHBR capability gate read in run_lt_fallback_test()
- Document force_uhbr parameter and "clear the pin" reset behaviour
v4:
- name the UHBR10 threshold and make i915_dp_is_uhbr_rate() a static inline in the header to avoid a cross-TU call
- parse intel_dp_allowed_link_configs instead of the source-only

    i915_dp_force_link_rate list in i915_dp_get_next_lower_rate()

- avoid the implicit long to int narrowing on the return value
v5: commit display reset before fallback
v6: Fold patch 4 to 3

Sowmiya S (3):
lib/i915/i915_dp: Add UHBR helpers and const-correct set_link_params tests/intel/kms_dp_linktrain_fallback: Reset traversed MST output
count
tests/intel/kms_dp_linktrain_fallback: Add UHBR-to-HBR fallback
subtest

 lib/i915/i915_dp.c                      |  58 ++++++-
 lib/i915/i915_dp.h                      |  24 ++-
 tests/intel/kms_dp_linktrain_fallback.c | 202 +++++++++++++++++++++---
 3 files changed, 260 insertions(+), 24 deletions(-)
Signature · 1 line
2.43.0