[PATCH i-g-t v1 2/2] tests/kms_vrr: Refactor VRR test to use global refresh rate from cmdline
Golani, Mitulkumar Ajitkumar
mitulkumar.ajitkumar.golani at intel.com
Thu Jul 31 11:08:44 UTC 2025
> -----Original Message-----
> From: Naladala, Ramanaidu <ramanaidu.naladala at intel.com>
> Sent: 09 July 2025 03:35
> To: igt-dev at lists.freedesktop.org
> Cc: Nautiyal, Ankit K <ankit.k.nautiyal at intel.com>; Golani, Mitulkumar
> Ajitkumar <mitulkumar.ajitkumar.golani at intel.com>; B S, Karthik
> <karthik.b.s at intel.com>; Naladala, Ramanaidu
> <ramanaidu.naladala at intel.com>
> Subject: [PATCH i-g-t v1 2/2] tests/kms_vrr: Refactor VRR test to use global
> refresh rate from cmdline
>
> Applies the refresh rate provided via the `-r` command-line option consistently
> to each display configuration during VRR testing.
> This change improves test consistency and allows users to control refresh rate
> behavior across all connected outputs.
>
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
> ---
> tests/kms_vrr.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c index a24f413de..b789a0a4f
> 100644
> --- a/tests/kms_vrr.c
> +++ b/tests/kms_vrr.c
> @@ -156,6 +156,8 @@ typedef struct data {
> bool static_image;
> } data_t;
>
> +uint32_t opt_rr;
> +
> typedef void (*test_t)(data_t*, enum pipe, igt_output_t*, uint32_t);
>
> /* Converts a timespec structure to nanoseconds. */ @@ -1090,6 +1092,8 @@
> run_vrr_test(data_t *data, test_t test, uint32_t flags)
> for_each_connected_output(&data->display, output) {
> enum pipe pipe;
>
> + data->vtest_ns.rate_ns =
> igt_kms_frame_time_from_vrefresh(opt_rr);
Are you expecting refresh rate will change from user given rate ?
Earlier implementation also looks ok, any purpose of change to update data->vtest_ns.rate_ns at this point ?
> +
> if (!config_constraint(data, output, flags))
> continue;
If you fail at config constrain for this test then capturing refresh rate here has no use.
>
> @@ -1111,6 +1115,7 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
> test(data, pipe, output, flags);
>
> }
> + data->vtest_ns.rate_ns = 0;
> igt_output_set_pipe(output, PIPE_NONE);
> igt_output_override_mode(output, NULL);
> }
> @@ -1125,7 +1130,7 @@ static int opt_handler(int opt, int opt_index, void
> *_data)
> data->duration_ns = atoi(optarg) * NSECS_PER_SEC;
> break;
> case 'r':
> - data->vtest_ns.rate_ns =
> igt_kms_frame_time_from_vrefresh(atoi(optarg));
> + opt_rr = atoi(optarg);
> break;
> case 's':
> data->static_image = true;
> --
> 2.43.0
More information about the igt-dev
mailing list