From: Lee Shawn C <shawn.c.lee@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Lee Shawn C <shawn.c.lee@intel.com>
Subject: [v2] tests/kms_vrr: add support for full range refresh rate testing
Date: Tue, 28 Apr 2026 06:12:02 +0000 [thread overview]
Message-ID: <20260428061202.3557766-1-shawn.c.lee@intel.com> (raw)
In-Reply-To: <20260427120955.3537070-1-shawn.c.lee@intel.com>
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.
v2: Fix build failure by adding documentation for the new subtest.
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
tests/kms_vrr.c | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 6043d40f1d74..b8a8c6aa79ed 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -66,6 +66,9 @@
* Description: Test to create a Virtual Mode in VRR range and switch to it
* without a full modeset.
*
+ * SUBTEST: seamless-rr-switch-virtual-full
+ * Description: Vrr seamless refresh rate switch for virtual modes using full range
+ *
* SUBTEST: lobf
* Description: Test to validate link-off between active frames in non-psr
* operation
@@ -93,9 +96,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 +758,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 +801,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 +1119,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
next prev parent reply other threads:[~2026-04-28 6:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Lee Shawn C [this message]
2026-04-28 7:10 ` [v2] " 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
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=20260428061202.3557766-1-shawn.c.lee@intel.com \
--to=shawn.c.lee@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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