Snap for 11400057 from 96b80b7aae582ba533b2006d21a1554c14fcf334 to simpleperf-release

Change-Id: I6f2d649d84b6c51c49190aa96b8bf196def89054
diff --git a/benchmarks/kms_throughput.c b/benchmarks/kms_throughput.c
index 6923045..7acb924 100644
--- a/benchmarks/kms_throughput.c
+++ b/benchmarks/kms_throughput.c
@@ -335,6 +335,15 @@
 	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,19 +421,11 @@
 
 	prepare(&display, p, output);
 
+	drmModeModeInfoPtr orig_mode = igt_output_get_mode(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 igt_fb **fb_sets =
 				malloc(sizeof(struct igt_fb*[tuning.num_fb_sets]));