[Intel-gfx] [PATCH igt 05/28] kms_pipe_crc_basic: Use for_each_connected_output()

Damien Lespiau damien.lespiau at intel.com
Fri Feb 7 15:48:49 CET 2014


Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 tests/kms_pipe_crc_basic.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index fdec077..7d48ca6 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -81,16 +81,13 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
 	igt_display_t *display = &data->display;
 	igt_pipe_crc_t *pipe_crc;
 	igt_crc_t *crcs = NULL;
-	int valid_connectors = 0, i;
+	int valid_connectors = 0;
+	igt_output_t *output;
 
-	for (i = 0;  i < display->n_outputs; i++) {
-		igt_output_t *output = &display->outputs[i];
+	for_each_connected_output(display, output) {
 		igt_plane_t *primary;
 		drmModeModeInfo *mode;
 
-		if (!output->valid)
-			continue;
-
 		igt_output_set_pipe(output, pipe);
 
 		fprintf(stdout, "%s: Testing connector %s using pipe %c\n",
-- 
1.8.3.1




More information about the Intel-gfx mailing list