[Intel-gfx] [PATCH 2/2] Revert "tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc."

Rodrigo Vivi rodrigo.vivi at intel.com
Mon Oct 13 12:39:08 CEST 2014


This reverts
     commit d92fbc23138b1014e8574daf29dbb06b8c81aa7a.
     Author: Rodrigo Vivi <rodrigo.vivi at intel.com>
     Date:   Tue Sep 9 12:25:47 2014 -0400

         tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc.

Sink CRC is fixed on kernel to wait as many vblanks as needed. It was fixed b
     commit ad9dc91b6e21266bfc6f466db4b95e10211f31ee
     Author: Rodrigo Vivi <rodrigo.vivi at gmail.com>
     Date:   Tue Sep 16 19:18:12 2014 -0400

         drm/i915: Fix Sink CRC

This this fix in place we don't need this extra 2 vblanks on test case itself

Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 tests/kms_sink_crc_basic.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/tests/kms_sink_crc_basic.c b/tests/kms_sink_crc_basic.c
index f02a950..5fb27d9 100644
--- a/tests/kms_sink_crc_basic.c
+++ b/tests/kms_sink_crc_basic.c
@@ -48,15 +48,9 @@ typedef struct {
 	igt_plane_t *primary;
 } data_t;
 
-static void get_crc(data_t *data, char *crc) {
+static void get_crc(char *crc) {
 	int ret;
-	FILE *file;
-
-	igt_wait_for_vblank(data->drm_fd, 0);
-	igt_wait_for_vblank(data->drm_fd, 0);
-
-	file = igt_debugfs_fopen("i915_sink_crc_eDP1", "r");
-
+	FILE *file = fopen("/sys/kernel/debug/dri/0/i915_sink_crc_eDP1", "r");
 	igt_require(file);
 
 	ret = fscanf(file, "%s\n", crc);
@@ -117,7 +111,7 @@ static void basic_sink_crc_check(data_t *data)
 	igt_display_commit(&data->display);
 
 	/* It should be Green */
-	get_crc(data, crc);
+	get_crc(crc);
 	assert_color(crc, GREEN);
 
 	/* Go Red */
@@ -125,7 +119,7 @@ static void basic_sink_crc_check(data_t *data)
 	igt_display_commit(&data->display);
 
 	/* It should be Red */
-	get_crc(data, crc);
+	get_crc(crc);
 	assert_color(crc, RED);
 }
 
@@ -142,7 +136,7 @@ static void run_test(data_t *data)
 		    c->connection != DRM_MODE_CONNECTED)
 			continue;
 
-		igt_output_set_pipe(output, 0);
+		igt_output_set_pipe(output, PIPE_ANY);
 
 		mode = igt_output_get_mode(output);
 
-- 
1.9.3




More information about the Intel-gfx mailing list