From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Nidhi Gupta <nidhi1.gupta@intel.com>
Subject: [igt-dev] [i-g-t 1/2] tests/kms_vrr: New subtest for toggle VRR during fastsets
Date: Mon, 27 Nov 2023 11:34:59 +0530 [thread overview]
Message-ID: <20231127060500.2517204-1-bhanuprakash.modem@intel.com> (raw)
Allow VRR to be toggled during fastsets, without full modeset.
This patch enables 'flip-basic' subtest to verify fastset too.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
tests/kms_vrr.c | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 13b347631..4e02e4aee 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -40,6 +40,10 @@
* Description: Tests that VRR is enabled and that the difference between flip
* timestamps converges to the requested rate
*
+ * SUBTEST: flip-basic-fastset
+ * Description: Tests that VRR is enabled without modeset and that the difference
+ * between flip timestamps converges to the requested rate
+ *
* SUBTEST: flip-dpms
* Description: Tests with DPMS that VRR is enabled and that the difference
* between flip timestamps converges to the requested rate.
@@ -77,7 +81,8 @@ enum {
TEST_DPMS = 1 << 1,
TEST_SUSPEND = 1 << 2,
TEST_FLIPLINE = 1 << 3,
- TEST_NEGATIVE = 1 << 4,
+ TEST_FASTSET = 1 << 4,
+ TEST_NEGATIVE = 1 << 5,
};
typedef struct range {
@@ -225,11 +230,15 @@ static bool vrr_capable(igt_output_t *output)
}
/* Toggles variable refresh rate on the pipe. */
-static void set_vrr_on_pipe(data_t *data, enum pipe pipe, bool enabled)
+static void set_vrr_on_pipe(data_t *data, enum pipe pipe,
+ bool need_modeset, bool enabled)
{
igt_pipe_set_prop_value(&data->display, pipe, IGT_CRTC_VRR_ENABLED,
enabled);
- igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+ igt_assert(igt_display_try_commit_atomic(&data->display,
+ need_modeset ? DRM_MODE_ATOMIC_ALLOW_MODESET : 0,
+ NULL) == 0);
}
/* Prepare the display for testing on the given pipe. */
@@ -402,7 +411,7 @@ test_basic(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
igt_info("VRR Test execution on %s, PIPE_%s with VRR range: (%u-%u) Hz\n",
output->name, kmstest_pipe_name(pipe), range.min, range.max);
- set_vrr_on_pipe(data, pipe, true);
+ set_vrr_on_pipe(data, pipe, !(flags & TEST_FASTSET), true);
/*
* Do a short run with VRR, but don't check the result.
@@ -468,7 +477,7 @@ test_basic(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
* modeset. And the expected behavior is the same as disabling VRR on
* a VRR capable panel.
*/
- set_vrr_on_pipe(data, pipe, (flags & TEST_NEGATIVE)? true : false);
+ set_vrr_on_pipe(data, pipe, !(flags & TEST_FASTSET), (flags & TEST_NEGATIVE) ? true : false);
rate = vtest_ns.mid;
result = flip_and_measure(data, output, pipe, rate, TEST_DURATION_NS);
igt_assert_f(result < 10,
@@ -558,6 +567,13 @@ igt_main
igt_subtest_with_dynamic("negative-basic")
run_vrr_test(&data, test_basic, TEST_NEGATIVE);
+ igt_describe("Tests that VRR is enabled without modeset and that the difference "
+ "between flip timestamps converges to the requested rate");
+ igt_subtest_with_dynamic("flip-basic-fastset") {
+ igt_require_intel(data.drm_fd);
+ run_vrr_test(&data, test_basic, TEST_FASTSET);
+ }
+
igt_fixture {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
--
2.40.0
next reply other threads:[~2023-11-27 6:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 6:04 Bhanuprakash Modem [this message]
2023-11-27 6:05 ` [igt-dev] [i-g-t 2/2] HAX: Add VRR tests to BAT Bhanuprakash Modem
2023-11-27 7:58 ` [igt-dev] ✗ CI.xeBAT: failure for series starting with [i-g-t,1/2] tests/kms_vrr: New subtest for toggle VRR during fastsets Patchwork
2023-11-27 8:14 ` [igt-dev] ✗ Fi.CI.BAT: " Patchwork
2023-12-07 4:43 ` [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/2] tests/kms_vrr: New subtest for toggle VRR during fastsets (rev2) 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=20231127060500.2517204-1-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nidhi1.gupta@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