aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-02-02 23:48:19 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-02-02 23:48:19 +0000
commit974bda752e105fac5ee236db22bb8dd547223084 (patch)
treefb46c2784ffd9eab6735f3cdc6718ca281756e27
parent812adc6fb75f9c43375ae9cea4b3966b8c7b698a (diff)
parent96b80b7aae582ba533b2006d21a1554c14fcf334 (diff)
downloadigt-gpu-tools-simpleperf-release.tar.gz
Snap for 11400057 from 96b80b7aae582ba533b2006d21a1554c14fcf334 to simpleperf-releasesimpleperf-release
Change-Id: I6f2d649d84b6c51c49190aa96b8bf196def89054
-rw-r--r--benchmarks/kms_throughput.c21
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 =