From 753352cb3cdd3a2c71c4279913109b2e3e6e9b90 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Tue, 8 Jul 2014 18:43:22 +0100 Subject: [PATCH] igt_kms: Introduce a for_each_pipe() macro Signed-off-by: Damien Lespiau --- lib/igt_kms.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 53856879..fb0e66ab 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -241,6 +241,9 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe); for (int i__ = 0; i__ < (display)->n_outputs; i__++) \ if ((output = &(display)->outputs[i__]), output->valid) +#define for_each_pipe(display, pipe) \ + for (pipe = 0; pipe < igt_display_get_n_pipes(display); pipe++) \ + /* * Can be used with igt_output_set_pipe() to mean we don't care about the pipe * that should drive this output