[Intel-gfx] [PATCH] tests/kms_psr_sink_crc: commit before querying mode

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Sep 20 00:21:18 UTC 2016


From: Mika Kuoppala <mika.kuoppala at intel.com>

Commit to a mode before querying it.

Tested-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=97172
Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 tests/kms_psr_sink_crc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index 8aafedb..68310d8 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -112,6 +112,14 @@ static void setup_output(data_t *data)
 			continue;
 
 		igt_output_set_pipe(output, pipe);
+		igt_display_commit(display);
+
+		if (!output->valid) {
+			igt_output_set_pipe(output, PIPE_ANY);
+			igt_display_commit(display);
+			continue;
+		}
+
 		data->crtc_id = output->config.crtc->crtc_id;
 		data->output = output;
 		data->mode = igt_output_get_mode(output);
-- 
1.9.1



More information about the Intel-gfx mailing list