From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EBAEDFF885D for ; Tue, 28 Apr 2026 07:42:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A02A310EA42; Tue, 28 Apr 2026 07:42:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mUEQFXrT"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F23B10EA42 for ; Tue, 28 Apr 2026 07:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777362147; x=1808898147; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+RRYGqgXllp272CNRFWM8vp4ZHpU5mExE73fgV4o9f0=; b=mUEQFXrT12PDnH9zVhE8x6R+I+louRdVoXRQz7tb9qE6NA2qSczLuEad WcKI141xq8FVZA75Ehq0yNy50kk5km9Z5pLf59mS3GWNJa33M0TYaoI1I mxz6Nn//uikf6c+y4NjNgM4eBbeP30KwV/ou/GeHr1O8rBdQEhj41Oilu KuVoq6YZQoOWVTCt/jgNovVJg8PAtNKa56K0HcI44UwZPAYzb+DBu/571 aYebGNh7Txlvki+N4hLQNvbM6UNC0KtIjtNX2iECa+zcNYqFBgbgYo6Zx t+XfLG0h32Km6hjDYcM2DHlxcD8lYB41sInZ0v0hAe9XvhUAXha6QhXiy w==; X-CSE-ConnectionGUID: GuhQxcpxRs2knbsUahE0Og== X-CSE-MsgGUID: sgE4AocmRxKakZN6Pd+PCQ== X-IronPort-AV: E=McAfee;i="6800,10657,11769"; a="78283449" X-IronPort-AV: E=Sophos;i="6.23,203,1770624000"; d="scan'208";a="78283449" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2026 00:42:26 -0700 X-CSE-ConnectionGUID: DKHsBR5USNmQs8u3vA9rkg== X-CSE-MsgGUID: GosKdWePRJSrde1Oun2aMA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,203,1770624000"; d="scan'208";a="229523449" Received: from shawnle1-i9-build-machine.itwn.intel.com ([10.225.64.200]) by fmviesa010.fm.intel.com with ESMTP; 28 Apr 2026 00:42:25 -0700 From: Lee Shawn C To: igt-dev@lists.freedesktop.org Cc: Lee Shawn C Subject: [v3] tests/kms_vrr: add support for full range refresh rate testing Date: Tue, 28 Apr 2026 07:34:02 +0000 Message-Id: <20260428073402.3559071-1-shawn.c.lee@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260427120955.3537070-1-shawn.c.lee@intel.com> References: <20260427120955.3537070-1-shawn.c.lee@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" 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. v3: Remove unnecessary '!!' operator when assigning to bool. Signed-off-by: Lee Shawn C --- 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..968c65e93d7d 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