diff options
author | Adrian Salido <salidoa@google.com> | 2024-01-31 23:26:08 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-01-31 23:26:08 +0000 |
commit | bf7d181c2b0f041439d0170dccb31b0cfc4315ce (patch) | |
tree | fc3494e715903121eaae8c77f6739f949e7780bf | |
parent | 9750998eae6a30751c7257bd052cb1cc9865b8c0 (diff) | |
parent | 96b80b7aae582ba533b2006d21a1554c14fcf334 (diff) | |
download | igt-gpu-tools-bf7d181c2b0f041439d0170dccb31b0cfc4315ce.tar.gz |
igt-gpu-tools: kms_throughput: switch to tuning mode earlier am: 96b80b7aaetemp_319669529
Original change: https://android-review.googlesource.com/c/platform/external/igt-gpu-tools/+/2937809
Change-Id: Ib4cd458821a52a7185a2002e21934e72c6349a70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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 = |