From: Kunal Joshi <kunal1.joshi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>, Sowmiya S <sowmiya.s@intel.com>
Subject: [PATCH i-g-t 02/13] tests/intel/kms_dp_link_training: use i915_dp_is_uhbr_rate()
Date: Thu, 1 Oct 2026 13:06:52 +0530 [thread overview]
Message-ID: <20261001073703.5067-3-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20261001073703.5067-1-kunal1.joshi@intel.com>
Remove the local duplicate of the UHBR check by switching to use
i915_dp_is_uhbr_rate() from lib/i915/i915_dp.h.
There should be no functional changes here.
Assisted-by: GitHub_Copilot:claude-opus-5
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
Reviewed-by: Sowmiya S <sowmiya.s@intel.com>
---
tests/intel/kms_dp_link_training.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/tests/intel/kms_dp_link_training.c b/tests/intel/kms_dp_link_training.c
index f67fdf59d..2d5241246 100644
--- a/tests/intel/kms_dp_link_training.c
+++ b/tests/intel/kms_dp_link_training.c
@@ -27,11 +27,6 @@
#include "intel/kms_joiner_helper.h"
#include "intel/kms_mst_helper.h"
-/*
- * DP Spec defines 10, 13.5, and 20 Gbps as UHBR.
- * Anything below that is considered NON-UHBR.
- */
-#define UHBR_LINK_RATE 1000000
#define RETRAIN_COUNT 1
typedef struct {
@@ -217,7 +212,7 @@ static bool run_link_rate_test(data_t *data, bool mst, bool uhbr)
max_lane_count = i915_dp_get_max_lane_count(data->drm_fd, data->output);
/* Check sink supports uhbr or not */
- is_uhbr_output = (max_link_rate >= UHBR_LINK_RATE);
+ is_uhbr_output = i915_dp_is_uhbr_rate(max_link_rate);
if ((uhbr && !is_uhbr_output) || (!uhbr && is_uhbr_output)) {
igt_info("Test expects %s, but output %s is %s.\n",
uhbr ? "UHBR" : "NON-UHBR",
@@ -244,9 +239,7 @@ static bool run_link_rate_test(data_t *data, bool mst, bool uhbr)
igt_info("Current link rate is %d\n", current_link_rate);
igt_assert_f(current_link_rate == max_link_rate,
"Link training did not succeed at max link rate.\n");
- igt_assert_f(is_uhbr_output ?
- current_link_rate >= UHBR_LINK_RATE :
- current_link_rate < UHBR_LINK_RATE,
+ igt_assert_f(i915_dp_is_uhbr_rate(current_link_rate) == is_uhbr_output,
is_uhbr_output ? "Link training didn't happen at uhbr rates" :
"Link training didn't happen at non-uhbr rates");
igt_info("----------------------------------------------------\n");
--
2.25.1
next prev parent reply other threads:[~2026-10-01 7:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Kunal Joshi [this message]
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
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=20261001073703.5067-3-kunal1.joshi@intel.com \
--to=kunal1.joshi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=sowmiya.s@intel.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