[Intel-gfx] [PATCH i-g-t 10/10] test/kms_psr_sink_crc: Add dpms off/on tests.

Rodrigo Vivi rodrigo.vivi at intel.com
Fri Mar 13 15:19:27 PDT 2015


Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 tests/kms_psr_sink_crc.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index 8d09b0a..38013df 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -539,6 +539,15 @@ static void setup_test_plane(data_t *data)
 	igt_display_commit(&data->display);
 }
 
+static void dpms_off_on(data_t data)
+{
+	kmstest_set_connector_dpms(data.drm_fd, data.output->config.connector,
+				   DRM_MODE_DPMS_OFF);
+	sleep(1);
+	kmstest_set_connector_dpms(data.drm_fd, data.output->config.connector,
+				   DRM_MODE_DPMS_ON);
+}
+
 static int opt_handler(int opt, int opt_index)
 {
 	switch (opt) {
@@ -614,6 +623,30 @@ int main(int argc, char *argv[])
 		}
 	}
 
+	igt_subtest_f("dpms_off_psr_active") {
+		data.test_plane = PRIMARY;
+		data.op = RENDER;
+		setup_test_plane(&data);
+		igt_assert(wait_psr_entry(&data));
+
+		dpms_off_on(data);
+
+		run_test(&data);
+		test_cleanup(&data);
+	}
+
+	igt_subtest_f("dpms_off_psr_exit") {
+		data.test_plane = SPRITE;
+		data.op = PLANE_ONOFF;
+		setup_test_plane(&data);
+
+		dpms_off_on(data);
+
+		igt_assert(wait_psr_entry(&data));
+		run_test(&data);
+		test_cleanup(&data);
+	}
+
 	igt_fixture {
 		drm_intel_bufmgr_destroy(data.bufmgr);
 		display_fini(&data);
-- 
1.9.3



More information about the Intel-gfx mailing list