From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
Manasi Navare <navaremanasi@chromium.org>,
Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Subject: [i-g-t 2/4] tests/kms_vrr: Fix hardcoded step size
Date: Fri, 21 Jun 2024 14:17:09 +0530 [thread overview]
Message-ID: <20240621084711.68444-3-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240621084711.68444-1-bhanuprakash.modem@intel.com>
In seamless-virtual subtest we are trying different Vrefresh
values between Vmin & Vmax by incrementing the Vrefresh by
by 10 Hz (hardcoded).
With this approach:
- We'll achieve less no. of refresh rates if VRR range is low
Ex: We can achieve only 1 step between 40 to 60 Hz.
- Execution time will increase in case of high VRR range.
Ex: We need 30 steps to reach 60 Hz to 360 Hz.
Instead of hardcoding the step size (10 Hz), allow test to
execute fixed number of steps (say 5 steps to reach Vmin to
Vmax) will guarantee to test (5) different refresh rates
between Vmin & Vmax irrespective of the VRR range.
Cc: Manasi Navare <navaremanasi@chromium.org>
Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_vrr.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 6fd04505e..2ea90cd8e 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -740,6 +740,7 @@ test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe, igt_output_t *outpu
uint32_t result;
unsigned int vrefresh;
uint64_t rate[] = {0};
+ uint32_t step_size;
igt_info("Use HIGH_RR Mode as default\n");
kmstest_dump_mode(&data->switch_modes[HIGH_RR_MODE]);
@@ -759,8 +760,14 @@ test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe, igt_output_t *outpu
"Refresh rate (%u Hz) %"PRIu64"ns: Target threshold not reached, result was %u%%\n",
data->switch_modes[HIGH_RR_MODE].vrefresh, rate[0], result);
+ /*
+ * Calculate step size by considering the no. of steps required to
+ * reach Vmin to Vmax as 5.
+ */
+ step_size = (data->range.max - data->range.min) / 5;
+
/* Switch to Virtual RR */
- for (vrefresh = data->range.min + 10; vrefresh < data->range.max; vrefresh += 10) {
+ for (vrefresh = data->range.min + step_size; vrefresh < data->range.max; vrefresh += step_size) {
drmModeModeInfo virtual_mode = virtual_rr_vrr_range_mode(output, vrefresh);
igt_info("Requesting Virtual Mode with Refresh Rate (%u Hz): \n", vrefresh);
--
2.43.2
next prev parent reply other threads:[~2024-06-21 8:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 8:47 [i-g-t 0/4] VRR test Cleanup Bhanuprakash Modem
2024-06-21 8:47 ` [i-g-t 1/4] tests/kms_vrr: Skip low RR mode check for seamless-virtual subtest Bhanuprakash Modem
2024-06-24 9:26 ` Golani, Mitulkumar Ajitkumar
2024-06-21 8:47 ` Bhanuprakash Modem [this message]
2024-06-24 12:12 ` [i-g-t 2/4] tests/kms_vrr: Fix hardcoded step size Golani, Mitulkumar Ajitkumar
2024-06-21 8:47 ` [i-g-t 3/4] tests/kms_vrr: Cleanup in creating the virtual mode Bhanuprakash Modem
2024-06-24 4:06 ` [i-g-t V2 " Bhanuprakash Modem
2024-07-03 5:11 ` Golani, Mitulkumar Ajitkumar
2024-06-21 8:47 ` [i-g-t 4/4] tests/kms_vrr: Fix virtual mode for CMRR subtest Bhanuprakash Modem
2024-07-03 5:20 ` Golani, Mitulkumar Ajitkumar
2024-06-21 9:34 ` ✗ CI.xeBAT: failure for VRR test cleanup (rev4) Patchwork
2024-06-21 9:40 ` ✓ Fi.CI.BAT: success " Patchwork
2024-06-21 11:18 ` ✗ CI.xeFULL: failure " Patchwork
2024-06-22 14:04 ` ✗ Fi.CI.IGT: " Patchwork
2024-06-24 4:40 ` ✓ CI.xeBAT: success for VRR test cleanup (rev5) Patchwork
2024-06-24 4:50 ` ✓ Fi.CI.BAT: " Patchwork
2024-06-24 5:39 ` ✓ CI.xeFULL: " Patchwork
2024-06-24 16:14 ` ✗ Fi.CI.IGT: failure " 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=20240621084711.68444-3-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mitulkumar.ajitkumar.golani@intel.com \
--cc=navaremanasi@chromium.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