summaryrefslogtreecommitdiff
path: root/tests/kms_vrr.c
diff options
context:
space:
mode:
authorBhanuprakash Modem <bhanuprakash.modem@intel.com>2023-12-13 10:07:36 +0530
committerBhanuprakash Modem <bhanuprakash.modem@intel.com>2023-12-13 13:50:16 +0530
commit4b8be865a12bfc9a2b88d0724c2c9aa246988b25 (patch)
treeec169aa778448684a4117dbd451dd0cd8f1cdb37 /tests/kms_vrr.c
parent5149a96317b97e2f0731909e686466f07a8ac1b0 (diff)
tests/kms_vrr: Clear VRR before exit
Before exiting the subtest, make sure to clear the VRR. V2: - New function for cleanup Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Diffstat (limited to 'tests/kms_vrr.c')
-rw-r--r--tests/kms_vrr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index bbdb54682..13e7f3ca6 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -469,8 +469,11 @@ test_basic(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
igt_assert_f(result < 10,
"Refresh rate (%u Hz) %"PRIu64"ns: Target VRR %s threshold exceeded, result was %u%%\n",
((range.max + range.min) / 2), rate, (flags & TEST_NEGATIVE)? "on" : "off", result);
+}
- /* Clean-up */
+static void test_cleanup(data_t *data, enum pipe pipe, igt_output_t *output)
+{
+ igt_pipe_set_prop_value(&data->display, pipe, IGT_CRTC_VRR_ENABLED, false);
igt_plane_set_fb(data->primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
igt_output_override_mode(output, NULL);
@@ -510,6 +513,9 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
igt_dynamic_f("pipe-%s-%s",
kmstest_pipe_name(pipe), output->name)
test(data, pipe, output, flags);
+
+ test_cleanup(data, pipe, output);
+
break;
}
}