Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Yacoub <markyacoub@google.com>
To: igt-dev@lists.freedesktop.org
Cc: Louis Chauvet <louis.chauvet@bootlin.com>,
	Mark Yacoub <markyacoub@google.com>
Subject: [PATCH] tests/unigraf: Hoist static DP link rate bounds and purge eDP rate
Date: Thu, 13 Aug 2026 14:29:24 -0400	[thread overview]
Message-ID: <20260813182924.2508072-1-markyacoub@google.com> (raw)

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


             reply	other threads:[~2026-08-13 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 18:29 Mark Yacoub [this message]
2026-08-13 21:41 ` ✓ i915.CI.BAT: success for tests/unigraf: Hoist static DP link rate bounds and purge eDP rate 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260813182924.2508072-1-markyacoub@google.com \
    --to=markyacoub@google.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=louis.chauvet@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox