[PATCH v1] tests/kms_vrr/cmrr: Skip display config when commit already failed
Mitul Golani
mitulkumar.ajitkumar.golani at intel.com
Mon Jun 16 05:29:19 UTC 2025
Don't prepare display pipe when commit already failed for tweaked
display mode. In this case display commit may already been rejected,
and still test tries to set display params on the same. If corresponding
CMRR mode is not found and tweaked mode is already failed to commit then
better further operation should be skipped.
Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>
---
tests/kms_vrr.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index d371d9d7f..01e5f73c0 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -920,13 +920,15 @@ test_cmrr(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
}
igt_output_override_mode(output, &mode);
- igt_display_commit2(&data->display, COMMIT_ATOMIC);
- prepare_test(data, output, pipe);
- result = flip_and_measure_cmrr(data, output, pipe, TEST_DURATION_NS * 2);
- igt_assert_f(result > 75,
- "Refresh rate (%u Hz) %"PRIu64"ns: Target CMRR on threshold not reached, result was %u%%\n",
- mode.vrefresh, igt_kms_frame_time_from_vrefresh(mode.vrefresh), result);
+ if (!igt_display_try_commit2(&data->display, COMMIT_ATOMIC)) {
+ prepare_test(data, output, pipe);
+ result = flip_and_measure_cmrr(data, output, pipe, TEST_DURATION_NS * 2);
+ igt_assert_f(result > 75,
+ "Refresh rate (%u Hz) %"PRIu64"ns: Target CMRR on threshold not reached, result was %u%%\n",
+ mode.vrefresh, igt_kms_frame_time_from_vrefresh(mode.vrefresh),
+ result);
+ }
}
static void test_cleanup(data_t *data, enum pipe pipe, igt_output_t *output)
--
2.48.1
More information about the igt-dev
mailing list