diff options
author | Adrian Salido <salidoa@google.com> | 2024-01-30 17:28:25 -0800 |
---|---|---|
committer | Adrian Salido <salidoa@google.com> | 2024-01-31 10:59:17 -0800 |
commit | 96b80b7aae582ba533b2006d21a1554c14fcf334 (patch) | |
tree | fb46c2784ffd9eab6735f3cdc6718ca281756e27 | |
parent | 47f047499a4deacc62a43fbbfed6a943e0e8a1f0 (diff) | |
download | igt-gpu-tools-96b80b7aae582ba533b2006d21a1554c14fcf334.tar.gz |
igt-gpu-tools: kms_throughput: switch to tuning mode earlier
When picking the peak mode for running kms throughput, the peak mode may
lead to higher resolution display. Switch to the peak mode so that
planes can be validated against that higher resolution.
Bug: 278647150
Test: run on device that support multiple resolutions + refresh rates
Change-Id: Ie8153982147604ec51dbf43105d93dd585a73730
-rw-r--r-- | benchmarks/kms_throughput.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/benchmarks/kms_throughput.c b/benchmarks/kms_throughput.c index 692304518..7acb9245f 100644 --- a/benchmarks/kms_throughput.c +++ b/benchmarks/kms_throughput.c @@ -335,6 +335,15 @@ void get_tuning(struct tuning *tuning, tuning->mode = get_peak_mode(output); igt_require(tuning->mode); + if (igt_output_get_mode(output) != tuning->mode) + { + igt_output_override_mode(output, tuning->mode); + igt_display_commit2(p->display, COMMIT_ATOMIC); + } + + igt_info("Chosen mode:\n"); + kmstest_dump_mode(tuning->mode); + tuning->num_iterations = 1000; tuning->num_fb_sets = 2; @@ -412,18 +421,10 @@ igt_main prepare(&display, p, output); - struct tuning tuning; - get_tuning(&tuning, &display, p, output); - drmModeModeInfoPtr orig_mode = igt_output_get_mode(output); - if (orig_mode != tuning.mode) - { - igt_output_override_mode(output, tuning.mode); - igt_display_commit2(&display, COMMIT_ATOMIC); - } - igt_info("Chosen mode:\n"); - kmstest_dump_mode(tuning.mode); + struct tuning tuning; + get_tuning(&tuning, &display, p, output); { struct igt_fb **fb_sets = |