public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_vrr: add support for full range refresh rate testing
@ 2026-04-27 12:09 Lee Shawn C
  2026-04-28  6:12 ` [v2] " Lee Shawn C
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Lee Shawn C @ 2026-04-27 12:09 UTC (permalink / raw)
  To: igt-dev; +Cc: Lee Shawn C

Currently, kms_vrr tests fixed step increments within the VRR range.
To better validate hardware stability and potential issues across the
entire spectrum, this patch adds a 'full-range' testing mode.

When the full-range flag is enabled, the test will:
1. Iterate from the maximum to the minimum refresh rate (stepping by 1).
2. For standard testing, maintain the existing behavior of incrementing
   from minimum to maximum using the defined step size.

Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
 tests/kms_vrr.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 6043d40f1d74..93bc9d3485ba 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -93,9 +93,10 @@ enum {
 	TEST_FLIPLINE = 1 << 3,
 	TEST_SEAMLESS_VRR = 1 << 4,
 	TEST_SEAMLESS_DRRS = 1 << 5,
-	TEST_SEAMLESS_VIRTUAL_RR = 1 << 6,
-	TEST_FASTSET = 1 << 7,
-	TEST_MAXMIN = 1 << 8,
+	TEST_SEAMLESS_VIRTUAL_RR_FAST = 1 << 6,
+	TEST_SEAMLESS_VIRTUAL_RR_FULL = 1 << 7,
+	TEST_FASTSET = 1 << 8,
+	TEST_MAXMIN = 1 << 9,
 	TEST_LINK_OFF = 1 << 10,
 	TEST_NEGATIVE = 1 << 11,
 	TEST_FORCE_RR = 1 << 12,
@@ -754,10 +755,12 @@ test_seamless_virtual_rr_basic(data_t *data, igt_crtc_t *crtc,
 			       igt_output_t *output, uint32_t flags)
 {
 	uint32_t result;
-	unsigned int vrefresh;
+	int vrefresh;
 	uint64_t rate[] = {0};
 	uint32_t step_size;
+	int start, end, step;
 	drmModeModeInfo virtual_mode;
+	bool full_vrr_range = !!(flags & TEST_SEAMLESS_VIRTUAL_RR_FULL);
 
 	igt_info("Use HIGH_RR Mode as default\n");
 	kmstest_dump_mode(&data->switch_modes[HIGH_RR_MODE]);
@@ -795,7 +798,17 @@ test_seamless_virtual_rr_basic(data_t *data, igt_crtc_t *crtc,
 		   (((data->range.max + data->range.min) / 2) + step_size) :
 		   data->range.min + step_size;
 
-	for ( ; vrefresh < data->range.max; vrefresh += step_size) {
+	if (full_vrr_range) {
+		start = data->range.max;
+		end = data->range.min;
+		step = -1;
+	} else {
+		start = data->range.min;
+		end = data->range.max;
+		step = step_size;
+	}
+
+	for (vrefresh = start; (step > 0) ? (vrefresh <= end) : (vrefresh >= end); vrefresh += step) {
 		virtual_rr_vrr_range_mode(&virtual_mode, vrefresh);
 
 		igt_info("Requesting Virtual Mode with Refresh Rate (%u Hz): \n", vrefresh);
@@ -1103,7 +1116,11 @@ int igt_main_args("drs:", long_opts, help_str, opt_handler, &data)
 
 		igt_describe("Test to switch to any custom virtual mode in VRR range without modeset.");
 		igt_subtest_with_dynamic("seamless-rr-switch-virtual")
-			run_vrr_test(&data, test_seamless_virtual_rr_basic, TEST_SEAMLESS_VIRTUAL_RR);
+			run_vrr_test(&data, test_seamless_virtual_rr_basic, TEST_SEAMLESS_VIRTUAL_RR_FAST);
+
+		igt_describe("Test to switch to all virtual modes in VRR range without modeset.");
+		igt_subtest_with_dynamic("seamless-rr-switch-virtual-full")
+			run_vrr_test(&data, test_seamless_virtual_rr_basic, TEST_SEAMLESS_VIRTUAL_RR_FULL);
 
 		igt_describe("Test to validate the link-off between active frames in "
 			     "non-PSR operation.");
-- 
2.34.1


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

end of thread, other threads:[~2026-04-28 16:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 12:09 [PATCH i-g-t] tests/kms_vrr: add support for full range refresh rate testing Lee Shawn C
2026-04-28  6:12 ` [v2] " Lee Shawn C
2026-04-28  7:10   ` Jani Nikula
2026-04-28  7:30     ` Lee, Shawn C
2026-04-28  7:29 ` ✓ i915.CI.BAT: success for tests/kms_vrr: add support for full range refresh rate testing (rev2) Patchwork
2026-04-28  7:34 ` [v3] tests/kms_vrr: add support for full range refresh rate testing Lee Shawn C
2026-04-28  7:43 ` ✓ Xe.CI.BAT: success for tests/kms_vrr: add support for full range refresh rate testing (rev2) Patchwork
2026-04-28  8:49 ` ✓ i915.CI.BAT: success for tests/kms_vrr: add support for full range refresh rate testing (rev3) Patchwork
2026-04-28  9:18 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-28 13:53 ` ✗ i915.CI.Full: failure for tests/kms_vrr: add support for full range refresh rate testing (rev2) Patchwork
2026-04-28 14:45 ` ✗ Xe.CI.FULL: " Patchwork
2026-04-28 15:00 ` ✗ i915.CI.Full: failure for tests/kms_vrr: add support for full range refresh rate testing (rev3) Patchwork
2026-04-28 16:43 ` ✓ Xe.CI.FULL: success " Patchwork

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