[i-g-t] tests/kms_vrr: Tweak virtual modes

Bhanuprakash Modem bhanuprakash.modem at intel.com
Fri Jun 21 06:38:45 UTC 2024


Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/intel-ci/blacklist.txt          |   3 -
 tests/intel-ci/fast-feedback.testlist | 170 +-------------------------
 tests/kms_vrr.c                       |  16 +--
 3 files changed, 12 insertions(+), 177 deletions(-)

diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt
index d01ef5e16..f6e9bb474 100644
--- a/tests/intel-ci/blacklist.txt
+++ b/tests/intel-ci/blacklist.txt
@@ -140,6 +140,3 @@ igt at device_reset@reset-bound
 
 # not working for i915
 igt at kms_bw@.*
-
-# Tests specific to (Display_ver > 14) are not applicable for i915
-igt at kms_vrr@cmrr
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index be0965110..edccaf42f 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -2,170 +2,6 @@
 igt at i915_module_load@load
 
 # Keep alphabetically sorted by default
-igt at core_auth@basic-auth
-igt at debugfs_test@read_all_entries
-igt at debugfs_test@basic-hwmon
-igt at debugfs_test@sysfs
-igt at fbdev@eof
-igt at fbdev@info
-igt at fbdev@nullptr
-igt at fbdev@read
-igt at fbdev@write
-igt at gem_basic@bad-close
-igt at gem_basic@create-close
-igt at gem_basic@create-fd-close
-igt at gem_busy@busy at all-engines
-igt at gem_close_race@basic-process
-igt at gem_close_race@basic-threads
-igt at gem_ctx_create@basic
-igt at gem_ctx_create@basic-files
-igt at gem_ctx_exec@basic
-igt at gem_exec_basic@basic
-igt at gem_exec_create@basic
-igt at gem_exec_fence@basic-busy
-igt at gem_exec_fence@basic-wait
-igt at gem_exec_fence@basic-await
-igt at gem_exec_fence@nb-await
-igt at gem_exec_gttfill@basic
-igt at gem_exec_parallel@engines
-igt at gem_exec_store@basic
-igt at gem_flink_basic@bad-flink
-igt at gem_flink_basic@bad-open
-igt at gem_flink_basic@basic
-igt at gem_flink_basic@double-flink
-igt at gem_flink_basic@flink-lifetime
-igt at gem_huc_copy@huc-copy
-igt at gem_linear_blits@basic
-igt at gem_mmap@basic
-igt at gem_mmap_gtt@basic
-igt at gem_render_linear_blits@basic
-igt at gem_render_tiled_blits@basic
-igt at gem_ringfill@basic-all
-igt at gem_softpin@allocator-basic
-igt at gem_softpin@allocator-basic-reserve
-igt at gem_softpin@safe-alignment
-igt at gem_sync@basic-all
-igt at gem_sync@basic-each
-igt at gem_tiled_blits@basic
-igt at gem_tiled_fence_blits@basic
-igt at gem_tiled_pread_basic
-igt at gem_wait@busy at all-engines
-igt at gem_wait@wait at all-engines
-igt at i915_getparams_basic@basic-eu-total
-igt at i915_getparams_basic@basic-subslice-total
-igt at i915_hangman@error-state-basic
-igt at i915_pciid
-igt at kms_addfb_basic@addfb25-4-tiled
-igt at kms_addfb_basic@addfb25-bad-modifier
-igt at kms_addfb_basic@addfb25-framebuffer-vs-set-tiling
-igt at kms_addfb_basic@addfb25-modifier-no-flag
-igt at kms_addfb_basic@addfb25-x-tiled-legacy
-igt at kms_addfb_basic@addfb25-x-tiled-mismatch-legacy
-igt at kms_addfb_basic@addfb25-yf-tiled-legacy
-igt at kms_addfb_basic@addfb25-y-tiled-legacy
-igt at kms_addfb_basic@addfb25-y-tiled-small-legacy
-igt at kms_addfb_basic@bad-pitch-0
-igt at kms_addfb_basic@bad-pitch-1024
-igt at kms_addfb_basic@bad-pitch-128
-igt at kms_addfb_basic@bad-pitch-256
-igt at kms_addfb_basic@bad-pitch-32
-igt at kms_addfb_basic@bad-pitch-63
-igt at kms_addfb_basic@bad-pitch-65536
-igt at kms_addfb_basic@bad-pitch-999
-igt at kms_addfb_basic@basic
-igt at kms_addfb_basic@basic-x-tiled-legacy
-igt at kms_addfb_basic@basic-y-tiled-legacy
-igt at kms_addfb_basic@bo-too-small
-igt at kms_addfb_basic@bo-too-small-due-to-tiling
-igt at kms_addfb_basic@clobberred-modifier
-igt at kms_addfb_basic@framebuffer-vs-set-tiling
-igt at kms_addfb_basic@invalid-get-prop
-igt at kms_addfb_basic@invalid-get-prop-any
-igt at kms_addfb_basic@invalid-set-prop
-igt at kms_addfb_basic@invalid-set-prop-any
-igt at kms_addfb_basic@no-handle
-igt at kms_addfb_basic@size-max
-igt at kms_addfb_basic@small-bo
-igt at kms_addfb_basic@tile-pitch-mismatch
-igt at kms_addfb_basic@too-high
-igt at kms_addfb_basic@too-wide
-igt at kms_addfb_basic@unused-handle
-igt at kms_addfb_basic@unused-modifier
-igt at kms_addfb_basic@unused-offsets
-igt at kms_addfb_basic@unused-pitches
-igt at kms_busy@basic
-igt at kms_prop_blob@basic
-igt at kms_cursor_legacy@basic-busy-flip-before-cursor-atomic
-igt at kms_cursor_legacy@basic-busy-flip-before-cursor-legacy
-igt at kms_cursor_legacy@basic-flip-after-cursor-atomic
-igt at kms_cursor_legacy@basic-flip-after-cursor-legacy
-igt at kms_cursor_legacy@basic-flip-after-cursor-varying-size
-igt at kms_cursor_legacy@basic-flip-before-cursor-atomic
-igt at kms_cursor_legacy@basic-flip-before-cursor-legacy
-igt at kms_cursor_legacy@basic-flip-before-cursor-varying-size
-igt at kms_dsc@dsc-basic
-igt at kms_flip@basic-flip-vs-dpms
-igt at kms_flip@basic-flip-vs-modeset
-igt at kms_flip@basic-flip-vs-wf_vblank
-igt at kms_flip@basic-plain-flip
-igt at kms_force_connector_basic@force-connector-state
-igt at kms_force_connector_basic@force-edid
-igt at kms_force_connector_basic@force-load-detect
-igt at kms_force_connector_basic@prune-stale-modes
-igt at kms_frontbuffer_tracking@basic
-igt at kms_hdmi_inject@inject-audio
-igt at kms_pipe_crc_basic@compare-crc-sanitycheck-xr24
-igt at kms_pipe_crc_basic@compare-crc-sanitycheck-nv12
-igt at kms_pipe_crc_basic@hang-read-crc
-igt at kms_pipe_crc_basic@nonblocking-crc
-igt at kms_pipe_crc_basic@nonblocking-crc-frame-sequence
-igt at kms_pipe_crc_basic@read-crc
-igt at kms_pipe_crc_basic@read-crc-frame-sequence
-igt at kms_pm_backlight@basic-brightness
-igt at kms_pm_rpm@basic-pci-d3-state
-igt at kms_pm_rpm@basic-rte
-igt at kms_psr@psr-primary-page-flip
-igt at kms_psr@psr-cursor-plane-move
-igt at kms_psr@psr-sprite-plane-onoff
-igt at kms_psr@psr-primary-mmap-gtt
-igt at kms_setmode@basic-clone-single-crtc
-igt at i915_pm_rps@basic-api
-igt at prime_self_import@basic-llseek-bad
-igt at prime_self_import@basic-llseek-size
-igt at prime_self_import@basic-with_fd_dup
-igt at prime_self_import@basic-with_one_bo
-igt at prime_self_import@basic-with_one_bo_two_files
-igt at prime_self_import@basic-with_two_bos
-igt at prime_vgem@basic-fence-flip
-igt at prime_vgem@basic-fence-mmap
-igt at prime_vgem@basic-fence-read
-igt at prime_vgem@basic-gtt
-igt at prime_vgem@basic-read
-igt at prime_vgem@basic-write
-igt at vgem_basic@setversion
-igt at vgem_basic@create
-igt at vgem_basic@debugfs
-igt at vgem_basic@dmabuf-export
-igt at vgem_basic@dmabuf-fence
-igt at vgem_basic@dmabuf-fence-before
-igt at vgem_basic@dmabuf-mmap
-igt at vgem_basic@mmap
-igt at vgem_basic@second-client
-igt at vgem_basic@sysfs
-
-# All tests that do module unloading and reloading are executed last.
-# They will sometimes reveal issues of earlier tests leaving the
-# driver in a broken state that is not otherwise noticed in that test.
-
-igt at core_hotunplug@unbind-rebind
-igt at vgem_basic@unload
-igt at i915_module_load@reload
-igt at gem_lmem_swapping@basic
-igt at gem_lmem_swapping@parallel-random-engines
-igt at gem_lmem_swapping@random-engines
-igt at gem_lmem_swapping@verify-random
-igt at i915_pm_rpm@module-reload
-
-# Kernel selftests
-igt at i915_selftest@live
-igt at dmabuf@all-tests
+igt at kms_vrr@cmrr
+igt at kms_vrr@flipline
+igt at kms_vrr@seamless-rr-switch-virtual
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 4b040fbe4..b62a7548f 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -230,9 +230,8 @@ low_rr_mode_with_same_res(igt_output_t *output, unsigned int vrr_min)
 }
 
 static drmModeModeInfo
-virtual_rr_vrr_range_mode(igt_output_t *output, unsigned int virtual_refresh_rate)
+virtual_rr_vrr_range_mode(drmModeModeInfo mode, unsigned int virtual_refresh_rate)
 {
-	drmModeModeInfo mode = *igt_output_get_mode(output);
 	uint64_t clock_hz = mode.clock * 1000;
 
 	mode.vtotal = clock_hz / (mode.htotal * virtual_refresh_rate);
@@ -740,6 +739,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,9 +759,11 @@ 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);
 
+	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) {
-		drmModeModeInfo virtual_mode = virtual_rr_vrr_range_mode(output, vrefresh);
+	for (vrefresh = data->range.min + step_size; vrefresh < data->range.max; vrefresh += step_size) {
+		drmModeModeInfo virtual_mode = virtual_rr_vrr_range_mode(data->switch_modes[HIGH_RR_MODE], vrefresh);
 
 		igt_info("Requesting Virtual Mode with Refresh Rate (%u Hz): \n", vrefresh);
 		kmstest_dump_mode(&virtual_mode);
@@ -802,9 +804,9 @@ test_cmrr(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
 	kmstest_dump_mode(&mode);
 
 	if (!found) {
-		igt_info("No CMRR mode found on %s, try to tweak the clock.\n", output->name);
+		igt_info("No CMRR mode found on %s, try to tweak the mode.\n", output->name);
 
-		mode.clock = (mode.htotal * mode.vtotal * (mode.vrefresh + VREFRESH_MODIFIER)) / 1000;
+		mode = virtual_rr_vrr_range_mode(mode, (mode.vrefresh + VREFRESH_MODIFIER));
 
 		igt_info("Tweaked mode: ");
 		kmstest_dump_mode(&mode);
@@ -865,7 +867,7 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 	igt_output_override_mode(output, &data->switch_modes[HIGH_RR_MODE]);
 
 	/* Search for a low refresh rate mode. */
-	if (!(flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS | TEST_SEAMLESS_VIRTUAL_RR)))
+	if (!(flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS)))
 		return true;
 
 	data->switch_modes[LOW_RR_MODE] = low_rr_mode_with_same_res(output, data->range.min);
-- 
2.43.2



More information about the Intel-gfx-trybot mailing list