Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> --- lib/igt_kms.c | 12 ++++++++---- lib/igt_kms.h | 6 ++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 3b75478..e2413e5 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1226,10 +1226,14 @@ void igt_output_set_pipe(igt_output_t *output, enum pipe pipe) { igt_display_t *display = output->display; - LOG(display, "%s: set_pipe(%c)\n", igt_output_name(output), - pipe_name(pipe)); - - output->pending_crtc_idx_mask = 1 << pipe; + if (pipe == PIPE_ANY) { + LOG(display, "%s: set_pipe(any)\n", igt_output_name(output)); + output->pending_crtc_idx_mask = -1UL; + } else { + LOG(display, "%s: set_pipe(%c)\n", igt_output_name(output), + pipe_name(pipe)); + output->pending_crtc_idx_mask = 1 << pipe; + } } igt_plane_t *igt_ouput_get_plane(igt_output_t *output, enum igt_plane plane) diff --git a/lib/igt_kms.h b/lib/igt_kms.h index e86cff4..07cf8a2 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -170,6 +170,12 @@ void igt_plane_set_position(igt_plane_t *plane, int x, int y); for (int i__ = 0; i__ < (display)->n_outputs; i__++) \ if ((output = &(display)->outputs[i__]), output->valid) +/* + * Can be used with igt_output_set_pipe() to mean we don't care about the pipe + * that should drive this output + */ +#define PIPE_ANY (-1) + #define IGT_FIXED(i,f) ((i) << 16 | (f)) #endif /* __IGT_KMS_H__ */ -- 1.8.3.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx