diff options
author | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2022-06-16 11:34:37 +0530 |
---|---|---|
committer | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2022-06-22 10:32:07 +0530 |
commit | 907a5e832cdd92a3ce68220836b29da8eb8fd91b (patch) | |
tree | 78c3f2b595050a5f9f237655389cf296c27cdee0 /tests/i915/kms_dsc.c | |
parent | 0994d9bfc7c6a697e8ceaad856ac6f392b57d32d (diff) |
tests/kms: Fix kms tests to use lib helpers to sort connector modes
Instead of writing our own wrappers for each subtest to sort connector
modes, just use the helpers from IGT library.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
Diffstat (limited to 'tests/i915/kms_dsc.c')
-rw-r--r-- | tests/i915/kms_dsc.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c index 617323e3..3506fcb5 100644 --- a/tests/i915/kms_dsc.c +++ b/tests/i915/kms_dsc.c @@ -133,22 +133,12 @@ static void kms_dsc_exit_handler(int sig) restore_force_dsc_en(); } -static int sort_drm_modes(const void *a, const void *b) -{ - const drmModeModeInfo *mode1 = a, *mode2 = b; - - return (mode1->clock < mode2->clock) - (mode2->clock < mode1->clock); -} - static drmModeModeInfo *get_highres_mode(igt_output_t *output) { drmModeConnector *connector = output->config.connector; drmModeModeInfo *highest_mode = NULL; - qsort(connector->modes, - connector->count_modes, - sizeof(drmModeModeInfo), - sort_drm_modes); + igt_sort_connector_modes(connector, sort_drm_modes_by_clk_dsc); highest_mode = &connector->modes[0]; |