Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/unigraf: Hoist static DP link rate bounds and purge eDP rate
@ 2026-08-13 18:29 Mark Yacoub
  2026-08-13 21:41 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mark Yacoub @ 2026-08-13 18:29 UTC (permalink / raw)
  To: igt-dev; +Cc: Louis Chauvet, Mark Yacoub

Currently, the link rate subtest dynamically iterates across
UNIGRAF_RATE_6_75_GHZ during its testing sweep. However, 6.75 Gbps is
structurally an exclusive eDP link rate parameter that physical external
DP sink testbeds do not natively map to. Iterating over it on external
chassis outputs reliably wastes execution cycles only to inevitably fail
a hardware constraint validation.

Additionally, the existing igt_require(max_supported_rate... validation
is currently executed at the very end of the loop, specifically after
the testbed has already triggered an expensive HPD pulse, retrained the
physical link, and rebuilt the IGT output wrapper.

This patch cleans out the test execution array, and physically hoists
the igt_dp_get_max_supported_rate() capability check completely outside
the active dynamic initialization context to serve strictly as a
zero-cost pre-flight evaluator. The subtest now cleanly skips
hardware-unsupported rate ceilings in 0.00s natively, significantly
shrinking the cumulative latency footprint of an automated CI pipeline.
---
 tests/unigraf/unigraf_lt.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/unigraf/unigraf_lt.c b/tests/unigraf/unigraf_lt.c
index 81e6ecd3f..c82607e14 100644
--- a/tests/unigraf/unigraf_lt.c
+++ b/tests/unigraf/unigraf_lt.c
@@ -127,13 +127,20 @@ int igt_main()
 		int rates[] = {UNIGRAF_RATE_1_62_GHZ,
 			       UNIGRAF_RATE_2_7_GHZ,
 			       UNIGRAF_RATE_5_4_GHZ,
-			       UNIGRAF_RATE_6_75_GHZ,
 			       UNIGRAF_RATE_8_10_GHZ};
 		int current_rate;
-		int max_supported_rate;
+		int max_supported_rate = 0;
+
+		output = igt_output_from_connector(&display, connector);
+		if (output)
+			max_supported_rate = igt_dp_get_max_supported_rate(drm_fd, output);
 
 		for (i = 0; i < ARRAY_SIZE(rates); i++) {
 			igt_dynamic_f("unigraf-dp-link-rate-%d", rates[i]) {
+				igt_require_f(max_supported_rate >= unigraf_rate_to_kbs(rates[i]),
+					      "Host port physically caps below test rate bounds (Host: %d, Test: %d)\n",
+					      max_supported_rate, unigraf_rate_to_kbs(rates[i]));
+
 				unigraf_reset();
 				unigraf_set_max_link_rate(rates[i]);
 				unigraf_hpd_pulse(1000000);
@@ -147,8 +154,6 @@ int igt_main()
 				init_output_and_display_pattern(&display, output);
 
 				current_rate = igt_dp_get_max_link_rate(drm_fd, output);
-				max_supported_rate = igt_dp_get_max_supported_rate(drm_fd, output);
-				igt_require(max_supported_rate >= unigraf_rate_to_kbs(rates[i]));
 				igt_assert_eq(current_rate, unigraf_rate_to_kbs(rates[i]));
 			}
 		}
-- 
2.55.0.691.gc56d675ccc-goog


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

end of thread, other threads:[~2026-08-14  7:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 18:29 [PATCH] tests/unigraf: Hoist static DP link rate bounds and purge eDP rate Mark Yacoub
2026-08-13 21:41 ` ✓ i915.CI.BAT: success for " Patchwork
2026-08-13 22:01 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-14  1:59 ` ✓ Xe.CI.FULL: " Patchwork
2026-08-14  7:07 ` ✗ i915.CI.Full: failure " Patchwork

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